@absolunet/tester

Test suite for Node.js projects

Usage no npm install needed!

<script type="module">
  import absolunetTester from 'https://cdn.skypack.dev/@absolunet/tester';
</script>

README

@absolunet/tester

npm npm dependencies npms Travis CI Code style

Test suite for JavaScript projects via 🃏Jest

Install

$ npm install @absolunet/tester

Usage

In your ./package.json file add

{
    "scripts": {
        "test":             "node test --scope=all",
        "test:standards":   "node test --scope=standards",
        "test:unit":        "node test --scope=unit",
        "test:feature":     "node test --scope=feature",
        "test:integration": "node test --scope=integration",
        "test:endtoend":    "node test --scope=endtoend"
    }
}

In a ./test/index.js file

const tester = require('@absolunet/tester');

tester.init({
    repositoryType: 'single-package',
    packageType:    'simple'
});

In a ./test/generic/index.test.js file

import { tester } from '@absolunet/tester';

tester.genericRepositoryTests();

Custom tests

Under ./test/[TYPE]/ folders, add your *.test.js Jest files.

Available [TYPE]s are:

  • standards
  • unit
  • feature
  • integration
  • endtoend

Documentation

View documentation



License

MIT © Absolunet