Neologistic Paraphasic Mumbling

npm

Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript.Learn more »

@bevry/testen

3.0.1 • Public • Published

@bevry/testen

Travis CI Build Status NPM version NPM downloads Dependency Status Dev Dependency Status
Patreon donate button Open Collective donate button Flattr donate button PayPal donate button Bitcoin donate button Wishlist browse button

Run your tests locally against multiple node.js versions

@bevry/testen is a fork of testen which continues maintenance with various improvements and fixes.

Examples

Success

success case

As JSON:

success case as JSON

Failure

failure case

As JSON:

failure case as JSON

Install

NPM

  • Install: npm install --global @bevry/testen
  • Executable: @bevry/testen
  • Editions

    This package is published with the following editions:

    • @bevry/testen aliases @bevry/testen/source/index.js
    • @bevry/testen/source/index.js is Source + ESNext + Require

    Older environments may need Babel's Polyfill or something similar.

    Usage

    Testen runs your tests again multiple node versions, however the testen client can only run on Node 8 or higher.

    Testen uses nvm behind the scens for its node.js version management.

    CLI Usage

    You can specify the exact node versions to test your project against by using the -n <version> flag (--node is also suitable). This flag can occur multiple times, and also supports versions seperated by a comma. Such that testen -n 8 -n 10 and testen -n 8,10 will both use node versions 8 and 10.

    If you do not specify any versions via the CLI arguments, then it will use:

    • the testen.node property of your projects package.json file
    • otherwise, the travis or circle ci node versions that you have configured for your project
    • otherwise, the current, stable, and system versions which are resolved by nvm

    If a node version is currently missing, it will be installed for you automatically.

    You can specify the extact command to run against your project by placing it after the -- argument, for example testen -- echo hello world to run echo hello world. If you do not specify a command via the CLI, then it will use:

    • the testen.command property of your projects package.json file
    • otherwise, npm test is used

    Other key arguments are:

    • --json will output the results in JSON format, for progamatic consumption
    • --verbose will report the details of all versions, not just the versions that have failed
    • --serial will run the tests serially (one after the other), however for performance, loading of versions still occurs in parallel

    And full help, as always is available via testen --help.

    API Usage

    Testen also provides an API which can be used like so:

    const {Versions} = require('@bevry/testen')
    async function main () {
        const versions = new Versions([4, 8, 10, 'current', 'stable', 'system'])
        await versions.load()
        await versions.install()
        await versions.test()
        console.log(versions.success)
    }
    main()

    Complete API documentation is available.

    History

    Discover the release history by heading on over to the HISTORY.md file.

    Contribute

    Discover how you can contribute by heading on over to the CONTRIBUTING.md file.

    Backers

    Maintainers

    No maintainers yet! Will you be the first?

    Sponsors

    No sponsors yet! Will you be the first?

    Patreon donate button Open Collective donate button Flattr donate button PayPal donate button Bitcoin donate button Wishlist browse button

    Contributors

    These amazing people have contributed code to this project:

    Discover how you can contribute by heading on over to the CONTRIBUTING.md file.

    License

    Unless stated otherwise all works are:

    and licensed under:

    install

    npm i @bevry/testen

    Downloadsweekly downloads

    4

    version

    3.0.1

    license

    MIT

    homepage

    github.com

    repository

    Gitgithub

    last publish

    collaborators

    • avatar
    • avatar
    Report a vulnerability