Categories
JavaScript Answers

How to solve “ReferenceError: expect is not defined” error message with Node?

Spread the love

To solve "ReferenceError: expect is not defined" error message with Node, we install chai.

To install it, we run

npm install chai

Then we write

const expect = chai.expect;

to get the chai.expect property.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *