0.2.0 • Published 5 years ago

testup v0.2.0

Weekly downloads
5
License
MIT
Repository
github
Last release
5 years ago

Testup

This is a basic installation of testup modules which includes:

  • @testup/core,
  • @testup/cli,
  • @testup/console-reporter.

Installation

npm i testup

Usage

  1. Create spec file, for example tests/index.spec.js:

    const assert = require('assert')
    
    module.exports = ({describe, it}) => {
      describe('Subject', () => {
        it('test', (ctx, test) => {
          const str = 'Hello, World!'
    
          assert.equal(str, 'Hello, World!', 'String is "Hello, World!"')
          test.done()
        })
      })
    }
  2. Add npm test script into package.json:

    {
      "scripts": {
        "test": "testup run test/*.spec.js"
      }
    }
  3. Run tests:
    npm test

License

MIT © Rumkin