Reputation: 9165
I have this line of code in my unit testing function with Mocha + Chai:
const result = <div>Hello</div>
getHelloDiv().should.be.equal.to(result)
But when I run Mocha, I get:
undefined is not a constructor (evaluating 'getHelloDiv().should.be.equal.to(result)')
Upvotes: 0
Views: 290
Reputation: 9165
Correcting this:
getHelloDiv().should.be.equal.to(result)
to this:
getHelloDiv().should.equal(result)
solved the issue.
Upvotes: 1