< Unit Testing < Jest

Create a JavaScript test environment.

  1. Install Node.js from Node.js.
  2. In a new folder, create a new node package.
    • npm init
    • Use default responses for everything except 'test command'. For 'test command', enter jest.
  3. Install Jest using:
    • npm install --save-dev jest
  4. Install the Jest command-line interface using:
    • npm install --save-dev jest-cli

References

This article is issued from Wikiversity. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.