Skip to content

Latest commit

 

History

History

README.md

@supertape/operator-react NPM version Build Status Coverage Status

supertape operator simplifies work with colored and indented output.

Install

npm i @supertape/operator-react -D

Operators

Adds next operators to work with:

reactEqual(fn, args [, message])

import {extend} from 'supertape';
import react from '@supertape/operator-react';
import {montag} from 'montag';

const test = extend(react);

test('redlint: react', (t) => {
    const [, result] = redlintTest(filesystem, {
        branch,
    });
    
    const expected = montag`
        # 🍄 hello
    `;
    
    t.reactEqual(result, expected);
    t.end();
});

t.reactEndEqual(fn[, message])

import test, {react} from 'supertape';
import {montag} from 'montag';

test('function called with no args', (t) => {
    const expected = montag`
        # 🍀 hello
    `;
    
    t.reactEndEqual(result, expected);
    t.end();
});

License

MIT