Skip to content

Latest commit

 

History

History
65 lines (47 loc) · 1.22 KB

README.md

File metadata and controls

65 lines (47 loc) · 1.22 KB

Support Ukraine Badge Stand With Ukraine

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