JSPM

  • Created
  • Published
  • Downloads 30
  • Score
    100M100P100Q78877F
  • License MIT

Microscopic task/test runner with support for async/await, callbacks, promises, streams, observables, plugins and custom reporters. Can also produce TAP output if you want, brilliant for building test frameworks and build systems.

Package Exports

  • asia

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (asia) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

asia npm version github tags mit license

Microscopic task/test runner with support for async/await, callbacks, promises, streams, observables, plugins and custom reporters. Can also produce TAP output if you want, brilliant for building test frameworks and build systems.

You might also be interested in voala.

todo

Quality πŸ‘Œ

By using commitizen and conventional commit messages, maintaining meaningful ChangeLog and commit history based on global conventions, following StandardJS code style through ESLint and having always up-to-date dependencies through integrations like GreenKeeper and David-DM service, this package has top quality.

code climate code style commitizen friendly greenkeeper friendly dependencies

Stability πŸ’―

By following Semantic Versioning through standard-version releasing tool, this package is very stable and its tests are passing both on Windows (AppVeyor) and Linux (CircleCI) with results from 100% to 400% test coverage, reported respectively by CodeCov and nyc (istanbul).

following semver semantic releases linux build windows build code coverage nyc coverage

Support πŸ‘

If you have any problems, consider opening an issue, ping me on twitter (@tunnckoCore), join the support chat room or queue a live session on CodeMentor with me. If you don't have any problems, you're using it somewhere or you just enjoy this product, then please consider support me at PayPal, since this is OPEN Open Source project made with love at Sofia, Bulgaria πŸ‡§πŸ‡¬.

tunnckoCore support tunnckoCore slack code mentor paypal donate NPM monthly downloads npm total downloads

Table of Contents

(TOC generated by verb using markdown-toc)

Install

Install with npm

$ npm install asia --save

or install using yarn

$ yarn add asia

Usage

For more use-cases see the tests

const fs = require('fs')
const fsP = require('fs-promise')
const test = require('asia')

// passing options
// tip: known issue:
// `fail-fast` behaviour not works
// correctly, so decrease `concurrency`
test({
  failFast: true, // default: false
  serial: true, // default: false
  args: [123], // default: `assert` module,
  concurrency: 5 // default: Infinity
})

test.task('foo quxie', () => {
  // it is the same as the main export "test"
})

// exact match
test.has('foo quexie') // => true

// string regex
test.has('.*oldschool.*') // => true

// real regex
test.has(/xie zaz/) // => true

test.use((app) => {
  // some plugin
  // for example: reporter
})

// sync test
test('foo bar baz', (t) => {
  t.strictEqual(123, 123)
})

// async/await
test('foo baz', async function (t) {
  const contents = await fsP.readFile('./package.json', 'utf8')
  const pkg = JSON.parse(contents)
  t.strictEqual(pkg.name, 'asia')
})

// returning promise
test('quxie zazzy', () => {
  return Promise.resolve(123)
})

// callbacks
test('some oldschool test', (t, done) => {
  fs.readFile('./package.json', 'utf8', (err, res) => {
    if (err) return done(er)
    t.ok(res.indexOf('name": "asia",'))
    done()
  })
})

API

todo

  • dush: Microscopic & functional event emitter in ~350 bytes, extensible through plugins | homepage
  • minibase: Minimalist alternative for Base. Build complex APIs with small units called plugins. Works well with most of the already existing… more | homepage
  • try-catch-core: Low-level package to handle completion and errors of sync or asynchronous functions, using once and dezalgo libs. Useful for and… more | homepage
  • voala: wip | homepage

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Please read the contributing guidelines for advice on opening issues, pull requests, and coding standards.
If you need some help and can spent some cash, feel free to contact me at CodeMentor.io too.

In short: If you want to contribute to that project, please follow these things

  1. Please DO NOT edit README.md, CHANGELOG.md and .verb.md files. See "Building docs" section.
  2. Ensure anything is okey by installing the dependencies and run the tests. See "Running tests" section.
  3. Always use npm run commit to commit changes instead of git commit, because it is interactive and user-friendly. It uses commitizen behind the scenes, which follows Conventional Changelog idealogy.
  4. Do NOT bump the version in package.json. For that we use npm run release, which is standard-version and follows Conventional Changelog idealogy.

Thanks a lot! :)

Building docs

Documentation and that readme is generated using verb-generate-readme, which is a verb generator, so you need to install both of them and then run verb command like that

$ npm install verbose/verb#dev verb-generate-readme --global && verb

Please don't edit the README directly. Any changes to the readme must be made in .verb.md.

Running tests

Clone repository and run the following in that cloned directory

$ npm install && npm test

Author

Charlike Mike Reagent

License

Copyright Β© 2017, Charlike Mike Reagent. Released under the MIT License.


This file was generated by verb-generate-readme, v0.6.0, on May 01, 2017.
Project scaffolded using charlike cli.