/testing-practice

Primary LanguageJavaScriptMIT LicenseMIT

Testing Practice

Project for trying the out the Jest test runner.

Getting Started

Clone the repository into your local computer.

Installing

First you'll have to install the newest version of Node. Install all packages:

$ npm install

Then from the console in the project repository install Jest using Yarn:

yarn add --dev jest

or npm:

npm install --save-dev jest

Note: Jest documentation uses yarn commands, but npm will also work. You can compare yarn and npm commands in the yarn docs, here.

To install Babel required dependencies via yarn:

yarn add --dev babel-jest @babel/core @babel/preset-env

Configure Babel to target your current version of Node by creating a babel.config.js file in the root of your project:

// babel.config.js
module.exports = {
  presets: [
    [
      '@babel/preset-env',
      {
        targets: {
          node: 'current',
        },
      },
    ],
  ],
};

Run the tests

From the console in project repository:

yarn test

or npm:

npm run test

Built With

Authors

👤 Vinicius Campos Carvalho

Screenshot Image

👤 Jaak Kivinukk

Screenshot Image

License

This project is licensed under the MIT License - see the LICENSE file for details

Acknowledgments