-
https://www.chaijs.com/plugins/chai-spies/ What is ee.on ? "Creating Spies function original () { const spy = chai.spy(original); // then use in place of original // or use without original |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The code demonstrates an example of how to use the spy like a function. In the example |
Beta Was this translation helpful? Give feedback.
The code demonstrates an example of how to use the spy like a function.
In the example
ee
is assumed to be an instance of Node'sEventEmitter
.'some event'
is an example event name. The point of the example is to show thatspy
can be passed around like a regular function.