@namics/test-suite
jest test suite
Last updated a year ago by smollweide .
MIT · Original npm · Tarball · package.json
$ cnpm install @namics/test-suite 
SYNC missed versions from official npm registry.

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

Current Tags

  • 0.1.3                                ...           latest (a year ago)

4 Versions

  • 0.1.3                                ...           a year ago
  • 0.1.2                                ...           a year ago
  • 0.1.1                                ...           a year ago
  • 0.1.0                                ...           a year ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 13
Dependencies (17)
Dev Dependencies (3)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |