@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 Tests npms License: MIT

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

See the full documentation for an in-depth look.

See the Changelog to see what has changed.

Contribute

See the Contributing Guidelines for ways to get started.

See the Support Guide for ways to get help.

See the Security Policy for sharing vulnerability reports.

This project has a Code of Conduct. By interacting with this repository, organization, or community you agree to abide by its terms.

License

MIT © Absolunet