Joe is a javascript testing framework that actually works. Unlike Mocha, we won't die on you abruptly when executing dynamically created tests and are always able to associate the correct test to the correct corresponding test suite. Switching from Mocha is trivial and only takes a few minutes.
JavaScript HTML
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
source
web
.editorconfig
.eslintrc.js
.gitignore v1.7.0. Improvement. Jun 4, 2016
.npmignore
.travis.yml
CONTRIBUTING.md
HISTORY.md
LICENSE.md
README.md
index.js
package.json

README.md

Joe

Travis CI Build Status NPM version NPM downloads Dependency Status Dev Dependency Status
Slack community badge Patreon donate button Gratipay donate button Flattr donate button PayPal donate button Bitcoin donate button Wishlist browse button

Joe is a JavaScript testing framework that actually works. Unlike Mocha, we won't die on you abruptly when executing dynamically created tests and are always able to associate the correct test to the correct corresponding test suite. Switching from Mocha is trivial and only takes a few minutes.

Install

NPM

  • Install: npm install --save joe
  • Module: require('joe')

Browserify

  • Install: npm install --save joe
  • Module: require('joe')
  • CDN URL: //wzrd.in/bundle/joe@1.8.0

Ender

  • Install: ender add joe
  • Module: require('joe')

Editions

This package is published with the following editions:

  • joe aliases joe/index.js which uses Editions to automatically select the correct edition for the consumers environment
  • joe/source/index.js is Source + ESNext + Require
  • joe/es2015/index.js is Babel Compiled + ES2015 + Require

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

Usage

Example

// define your test suite
require('joe').suite('suite name', function (suite, test) {
    // group together items into sub suites if you desire
    suite('sub suite name', function (suite, test) {
        // create both synchronous and asynchronous tests
        test('synchronous test', function () {
            console.log('do your sync stuff')
        })

        test('asynchronous test name', function (complete) {
            console.log('do your async stuff')
            setTimeout(function () {
                complete()
            }, 500)
        })

        // run a methods before and\or after the test
        function beforeEach(test) {
            console.log('do some pre test stuff')
        }
        function afterEach(test, err) {
            console.log('do some post test stuff')
        }

        test('before and after options test', {before: beforeEach, after: afterEach}, function () {
            console.log('do your before and after stuff')
        })
    })

    // you can also define tests dynamically when using the completion callback on the group
    suite('lets create dynamic tests', function (suite, it, done) {
        setTimeout(function () {
            test('a synchronous dynamic test', function () {
                console.log('do your sync stuff')
            })
            done()
        }, 500)
    })
})
$ node example.js
suite name
suite name ➞  sub suite name
suite name ➞  sub suite name ➞  synchronous test
suite name ➞  sub suite name ➞  synchronous test ✔   
suite name ➞  sub suite name ➞  asynchronous test name
suite name ➞  sub suite name ➞  asynchronous test name ✔   
suite name ➞  sub suite name ✔  
suite name ➞  lets create dynamic tests
suite name ➞  lets create dynamic tests ➞  a synchronous dynamic test
suite name ➞  lets create dynamic tests ➞  a synchronous dynamic test ✔   
suite name ➞  lets create dynamic tests ✔  
suite name ✔  

3/3 tests ran successfully, everything passed

Complete Documentation

View the Complete Joe Documentation on the Bevry Learning Centre

Custom Reporters

Discover the available Custom Reporters for Joe using the joe-reporter keyword on the NPM Registry

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

These amazing people are maintaining this project:

Sponsors

No sponsors yet! Will you be the first?

Patreon donate button Gratipay 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: