From fcd60e7968e8f71d2f2320188958e36af2e54277 Mon Sep 17 00:00:00 2001 From: Canna Wen Date: Wed, 13 Sep 2017 13:20:51 +0200 Subject: [PATCH] Clean up tests --- test/personality-test.js | 30 +++++++++--------------------- 1 file changed, 9 insertions(+), 21 deletions(-) diff --git a/test/personality-test.js b/test/personality-test.js index 3a29194..dc5d229 100644 --- a/test/personality-test.js +++ b/test/personality-test.js @@ -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', () => { @@ -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', () => { @@ -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', () => { @@ -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', () => { @@ -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', () => {