-
Notifications
You must be signed in to change notification settings - Fork 31
Closed
Labels
good first issueGood for newcomersGood for newcomers
Description
Use the Node.js test runner mock.fn instead of the current mockedFunction (we dit that because mock was not available at the time).
Lines 9 to 27 in 5441439
| export function mockedFunction() { | |
| return { | |
| called: 0, | |
| args: [], | |
| at(position) { | |
| return this.args[position]; | |
| }, | |
| haveBeenCalledTimes(count = 0) { | |
| return this.called === count; | |
| }, | |
| haveBeenCalledWith(value) { | |
| return this.args.includes(value); | |
| }, | |
| callback(...args) { | |
| this.args.push(...args); | |
| this.called++; | |
| } | |
| }; | |
| } |
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomers