@namics/test-suite

0.1.3 • Public • Published

Test suite npm

reusable and easy to use jest test suite

Usage

npm i -D @namics/test-suite

This packages uses jest and enzyme please read their documentations for details. Most parts are copied from the Create React App unit test solution.

package.json

  ...
  "scripts": {
    "test": "test-suite --coverage",
    "test:dev": "test-suite",
    ...
  },
  ...

Collect Coverage

package.json

"jest": {
  "collectCoverageFrom": [
	"src/**/*.{js|jsx|ts|tsx}",
	"!src/**/*.stories.{js|jsx|ts|tsx}",
	"!src/dev.ts",
	"!src/index.tsx"
  ]
},

allowed configurations:

key documentation
collectCoverageFrom https://jestjs.io/docs/en/configuration#collectcoveragefrom-array
coverageReporters https://jestjs.io/docs/en/configuration#coveragereporters-array-string
coverageThreshold https://jestjs.io/docs/en/configuration#coveragethreshold-object
resetMocks https://jestjs.io/docs/en/configuration#resetmocks-boolean
resetModules https://jestjs.io/docs/en/configuration#resetmodules-boolean
snapshotSerializers https://jestjs.io/docs/en/configuration#snapshotserializers-array-string
watchPathIgnorePatterns https://jestjs.io/docs/en/configuration#watchpathignorepatterns-array-string

License

MIT License

Readme

Keywords

none

Package Sidebar

Install

npm i @namics/test-suite

Weekly Downloads

0

Version

0.1.3

License

MIT

Unpacked Size

11.7 kB

Total Files

12

Last publish

Collaborators

  • coder1389
  • merkleorg
  • namicsorg
  • ernscht
  • tamara027
  • tsailer