Unit Testing/Jest/Install 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

edit