0.5.5 • Published 7 years ago

atool-test v0.5.5

Weekly downloads
49
License
MIT
Repository
github
Last release
7 years ago

atool-test

NPM version Build Status Coverage Status

Simple configuration, focus more on the writing tests.

Built-in

Usage

Add -test.js or -spec.js suffix with your test files

"srcipts": {
  "test": "atool-test"
}

with options:

atool-test --port 9888 --no-chai --no-coverage --keep

Options

  • -p, --port: server port, default is 9876;
  • --no-coverage: without coverage output;
  • --no-chai: run test without chai;
  • -k, --keep: keep process after tests, for browser test;
  • --config <path>: custom config path, default is webpack.config.js';
  • mocha-phantomjs options

Custom Assert

atool-test --no-chai

  • expectjs: npm install expect.js --save-dev
  • shouldjs: npm install should --save-dev
// test code
import expect from 'expect.js';

Part Of test Files

If you want to test with part of files, custom cwd/webpack.config.js:

module.exports = function(webpackConfig) {
  webpackConfig.atoolTestSpec = ['./tests/moduleA-test.js', './tests/**/*-spec.js'];
  return webpackConfig;
};

support glob files;

Html Extra Files

custom cwd/webpack.config.js:

module.exports = function(webpackConfig) {
  webpackConfig.htmlWebpackPlugin = {
    files: {
      js: ['xx.js'],
      css: ['xx.css']
    }
  };
  return webpackConfig;
};

base file path: /tests

Browser Test & Debug

Run with --keep && --no-coverage option, open http://127.0.0.1:${port}/tests/runner.html in your browser.

0.5.5

7 years ago

0.5.4

7 years ago

0.5.3

7 years ago

0.5.2

7 years ago

0.5.1

8 years ago

0.5.0

8 years ago

0.4.19

8 years ago

0.4.18

8 years ago

0.4.17

8 years ago

0.4.16

8 years ago

0.4.15

8 years ago

0.4.14

8 years ago

0.4.13

8 years ago

0.4.12

8 years ago

0.4.12-beta

8 years ago

0.4.11

8 years ago

0.4.10

8 years ago

0.4.9

8 years ago

0.4.8

8 years ago

0.4.7

8 years ago

0.4.6

8 years ago

0.4.5

8 years ago

0.4.4

8 years ago

0.4.3

8 years ago

0.3.2

8 years ago

0.4.2

8 years ago

0.4.1

8 years ago

0.4.0

8 years ago

0.3.1

8 years ago

0.3.0

8 years ago

0.2.9

8 years ago

0.2.8

8 years ago

0.2.7

8 years ago

0.2.6

8 years ago

0.2.5

8 years ago

0.2.4

8 years ago

0.2.3

8 years ago

0.2.2

8 years ago

0.2.1

8 years ago

0.2.0

8 years ago

0.1.0

8 years ago