Code:
async function a() { }
console.log(typeof a);
console.log(a instanceof Function);
assert.isFunction(a);
Result:
function
true
AssertionError: expected [Function: a] to be a function
at Function.assert.isFunction (node_modules/chai/lib/chai/interface/assert.js:516:35)
at Context.it (test/CoreTest.js:87:11)
@atheros thanks for the issue. What version of chai are you using? Could you try installing npm i chai@canary and see if the problem persists.
@keithamus thanks for quick response. Issue is present in chai 3.5.0. Tested with node 7.7.4.
chai@canary doesn't have this problem, I guess I'll switch to this version.
@atheros FWIW we plan to have chai@4 released by end of April. canary is relatively battle tested.
Not working with 4.2.0 as well
Having the same problem with "chai": "^4.0.0-canary.2",
Most helpful comment
Not working with 4.2.0 as well