@klaster_1/testcafe-repeat-test
v1.0.2
Published
A tool to ergonomically repeat TestCafe tests
Downloads
650
Readme
TestCafe repeat test
A tool to ergonomically repeat a specific TestCafe test and skip other tests. Useful for debugging unstable tests.
Installation
npm i @klaster_1/testcafe-repeat-test
Usage notes
Test repeater only works if you use the globally available function and do not import it from TestCafe:
// Works
repeatTest(2)
test('Test', async t => {})
// Doesn't work
import {test} from 'testcafe'
repeatTest(2)
test('Test', async t => {})
Examples:
import repeatTest from '@klaster_1/testcafe-repeat-test';
fixture`Demo`
repeatTest(3)
test('Demo', async (t) => {
console.log('Hello world')
})
// Log:
// Default
// √ Demo 1
// √ Demo 2
// √ Demo 3
import repeatTest from '@klaster_1/testcafe-repeat-test';
fixture`Demo`
repeatTest(2, {rename: false})
test('Demo', async (t) => {
console.log('Hello world')
})
// Log:
// Default
// √ Demo
// √ Demo