Created
November 28, 2017 18:17
-
-
Save pkriete/4777149233ea46f39492a21e5e5f8947 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Server from 'server'; | |
import Logger from 'logger'; | |
import Slack from 'slackNotifier'; | |
import sinon from 'sinon'; | |
it('should log startup errors and send them to slack', () => { | |
sinon.spy(Logger, 'logException'); | |
Slack.notify = sinon.spy(() => {}); | |
Server.create({ port: 5000 }); | |
Server.create({ port: 5000 }); // port already taken | |
expect(Slack.notify).to.be.called(); | |
expect(Logger.logException).to.be.called(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment