Last active
February 17, 2020 15:22
-
-
Save keithstric/9836335df3f89f72407da417501fe24b to your computer and use it in GitHub Desktop.
Adventures in Unit Testing 1
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
const EventEmitter = require('events').EventEmitter; | |
global.customEmitter = new EventEmitter(); | |
let evtCount = 0; | |
module.exports = function someFunction() { | |
global.customEmitter.addListener('foo', somePrivateFunction); | |
} | |
function somePrivateFunction() { | |
evtCount++; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment