marty-mcfly-unit

v1.0.0
Marty McFly Unit - Time Travel Test Runner =====================================

Marty McFly Unit - Time Travel Test Runner

Demo

Github Demo

Description

Run your tests in any browser and see more detail when tests fail by stepping back in time with redux-devtools.

Rerunning failed tests allows you to hop straight into the chrome debugger and step through the test execution.

Installation

npm install marty-mcfly-unit

Usage

import mcFlyRunner from 'marty-mcfly-unit'

function positiveSum(a, b) {
    return new Promise((res, rej) => {
        const val = a + b > 0;
        setTimeout(() => {
            res(val);
        }, 2000)
    })
}

const testCases [
    {
        args: [0, 0],
        expected: false
    }, {
        args: [1, 1],
        expected: true
    }, {
        args: [-2, 0],
        expected: false
    }
]

mcFlyRunner(testCases, positiveSum);
npm i marty-mcfly-unit

Metadata

  • ISC
  • Whatever
  • Unknown
  • released 2/13/2017

Downloads

Maintainers