Skip to content

Commit

Permalink
Clean up tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cannawen committed Sep 13, 2017
1 parent 4f03637 commit fcd60e7
Showing 1 changed file with 9 additions and 21 deletions.
30 changes: 9 additions & 21 deletions test/personality-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,17 @@ describe('Personality', () => {
personality = proxyquire('../src/personality', { './helper': helperStub });
});

describe('#reply()', () => {
describe('#reply()', () => {
context('Good bot', () => {
it('should reply', () => {
verify("good bot", "Good human");
});

it('should handle negations', () => {
verify("not a good bot", undefined);
});
});

context('Bad bot', () => {
it('should reply', () => {
verify("Bad bot!", "Bad carbon-based life form");
});

it('should handle negations', () => {
verify("not a bad bot", undefined);
});
});

context('Thanks|Thank you|thx|ty', () => {
Expand All @@ -39,10 +31,6 @@ describe('Personality', () => {
verify("thx bot", "Glad to be of service");
verify("ty bot", "Glad to be of service");
});

it('should handle negations', () => {
verify("no thanks", undefined);
});
});

context('love you|love ya|love u', () => {
Expand All @@ -51,10 +39,6 @@ describe('Personality', () => {
verify("love ya, buddy", "What is love?");
verify("love u", "What is love?");
});

it('should handle negations', () => {
verify("no one love you", undefined);
});
});

context('{{x}} bot', () => {
Expand All @@ -70,10 +54,6 @@ describe('Personality', () => {
verify("urg, dumb bot!", "To be fair, I _am_ still in beta ¯\_(ツ)_/¯");
verify("so useless bot", "To be fair, I _am_ still in beta ¯\_(ツ)_/¯");
});

it('should handle negations', () => {
verify("you're not a stupid bot", undefined);
});
});

context('Good human|Good fellow human', () => {
Expand Down Expand Up @@ -144,6 +124,14 @@ describe('Personality', () => {
verify("☜", "(☞゚ヮ゚)☞");
});
});

context('Negations', () => {
it('should not reply', () => {
verify("not a good bot", undefined);
verify("no thanks", undefined);
verify("you're not a stupid bot", undefined);
});
});

context('Random message', () => {
it('should not reply', () => {
Expand Down

0 comments on commit fcd60e7

Please sign in to comment.