I want to check if something is a function with Chai.should. So I did
typeof(barfoo).should.equals('function')
This results in
AssertionError: expected [Function] to equal 'function'
at Context.<anonymous> (:73:31)
Can someone explain to me why this doesn't work, because if I simply do
typeof(barfoo)
I get a string function
. Although I've solved this now with instanceOf
but I really want to understand this
Aucun commentaire:
Enregistrer un commentaire