Socket
Socket
Sign inDemoInstall

beater

Package Overview
Dependencies
2
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    beater

beater: bouzuya's easy test runner. it is inspired by eater.


Version published
Weekly downloads
27
decreased by-15.62%
Maintainers
1
Install size
30.7 kB
Created
Weekly downloads
 

Changelog

Source

9.0.1 (2020-04-11)

  • build(deps): update dependencies

  • build(deps-dev): update devDependencies

  • Bump eslint-config-prettier from 6.9.0 to 6.10.0 (7ee3e2d)

  • Bump sinon from 8.0.4 to 8.1.0 (1affec4)

  • Bump typescript from 3.7.4 to 3.7.5 (a8fe209)

  • refactor!: drop support for node.js v8 (02564a4)

  • build: add eslint and prettier (80d3b07)

  • build: bump sinon from 8.0.1 to 8.1.1 (5bb1f3c)

  • build: stop searching for other eslint configs (1d9d266)

  • build(deps-dev): bump @typescript-eslint 2.17.0 to 2.18.0 (482617c)

  • build(deps-dev): bump babel from 7.8.3 to 7.8.4 (f476a4c)

  • build(deps-dev): update devDependencies (7d6464b)

  • build(deps): update dependencies (945b342)

  • refactor: apply eslint (573cbae)

  • style: apply prettier (a57d6bf)

BREAKING CHANGE

  • drop support for node.js v8

Readme

Source

beater logo

beater: bouzuya's easy test runner. beater is inspired by eater.

Features

  • Only 2 functions:
    • run()
    • runWithOptions()
  • You can use your favorite assert().
  • You can use your favorite reporter.
  • You can use TypeScript (3.x *.d.ts is included).

Usage

1. Install

$ npm install --save-dev beater

2. Write test

// test/index.js
const assert = require('assert');
const { run } = require('beater');

const test1 = function simple_test() {
  assert(1 === 1);
};

const test2 = function promise_test() {
  return new Promise((resolve) => {
    assert(1 === 1);
    resolve();
  });
};

const test3 = async function async_fn_test() {
  await new Promise((resolve) => setTimeout(resolve, 0));
  assert(1 === 1);
};

run([test1, test2, test3]).catch(() => process.exit(1));

3. Run

$ node test/index.js
TAP version 13
1..3
ok 1 - simple_test
ok 2 - promise_test
ok 3 - async_fn_test

Badges

npm version Travis CI

License

MIT

Author

bouzuya <m@bouzuya.net> (https://bouzuya.net/)

Keywords

FAQs

Last updated on 11 Apr 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc