@caustic-code/testing
TypeScript icon, indicating that this package has built-in type declarations

1.6.0 • Public • Published

testing

Exposes testing frameworks for other modules to use in this project.

Currently using Mocha, Chai and TS-Node.

nyc and coveralls is used for code coverage.

source-map-support added for compatibility.

Sample test script to put into package.json:

{
  "scripts": {
    "test": "nyc mocha -r ts-node/register src/**/*.spec.ts --require source-map-support/register" ,
    "coverage": "nyc report --reporter=text-lcov | coveralls"
  },
}

Sample .travis.yml file:

language: node_js
node_js:
  - "node"
cache:
  directories:
    - "node_modules"
after_success: npm run coverage

Sample .nycrc file:

{
  "extension": [
    ".ts"
  ],
  "require": [
    "ts-node/register"
  ],
  "include": [
    "src/**/*.ts"
  ],
  "exclude": [
    "**/*.d.ts",
    "**/*.spec.ts"
  ],
  "reporter": [
    "text-summary",
    "html"
  ],
  "sourceMap": true,
  "instrument": true
}

Readme

Keywords

none

Package Sidebar

Install

npm i @caustic-code/testing

Weekly Downloads

2

Version

1.6.0

License

MIT

Last publish

Collaborators

  • kostyapro