Closed mirayashi closed 1 year ago
.to.be.an
effectively checks the Symbol.toStringTag
of the object. If you want to assert on the typeof
, then you should use expect(typeof buf).to.equal('object')
.
I'll close this as it's not a bug within chai, it's working as intended.
Let the following test:
Expected result: the test should pass because
expect(typeof buf).to.equal('object')
doesActual result: it fails
chai version 4.3.9