[go: up one dir, main page]

marty-mcfly-unit

1.0.0 • Public • Published

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);

Readme

Keywords

none

Package Sidebar

Install

npm i marty-mcfly-unit

Weekly Downloads

0

Version

1.0.0

License

ISC

Last publish

Collaborators

  • rphansen91