Skip to content
This repository has been archived by the owner on May 9, 2024. It is now read-only.

coopdigital/quickstartjest

Repository files navigation

node quick start with js

This contains a repo you can fork (don't clone/push) to get quickly started with test-driven js.

Once cloned run npm ci then npm test (using npm ci rather than npm install will ensure a clean install). All the tests should fail see the Example tests section below.

A Sample function is in src/index.js with a corresponding test in __tests__/main.tests.js to get you started.

Its based on the quickstart in the gist

Its expected that you run the current stable node version. (12.3.0). You should use nvm to manage this: see the gist for more details.

Example tests

Included in the __tests__ directory is example.tests.js

This contains failing tests that will introduce you to the basics of jest the testing framework used.

You can safely delete this file if not needed or add the following to package.json so its ignored.

"testPathIgnorePatterns": [
      "/node_modules/",
      "__tests__/example.tests.js",
    ]
  }
}

About

Quick start for test driven js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published