When running tests in wallaby the setTimeout[util.promisify.custom] property is missing, which causes util.promisify
to fail.
Running this gist with the command line npm test
will result in a passing test.
test
√ should wait one second and then return the given value (1004ms)
1 passing (1s)
When run with wallaby the test fails.
1 failing test, 0 passing
test should wait one second and then return the given value [6 ms]
"callback" argument must be a function
at Context.it test.js:8:8
The native nodejs util.promisify
method expects to find an alternative implementation for use with promises defined on the
setTimeout[util.promisify.custom] property. This property is in tact when run with the command line, but is missing when wallaby runs
the tests.
The correct behaviour can be restored by defining an equivalent implementation on setTimeout[util.promisify.custom] in the wallaby
setup
method.