Documentation
REFERENCE
Runner.src Method
Configures the test runner to run tests from the specified files.
src(source) → this
Parameter | Type | Description |
---|---|---|
source |
String | Array | The relative or absolute path to a test fixture file, or several such paths. You can use glob patterns to include (or exclude) multiple files. |
TestCafe can run:
- JavaScript, TypeScript and CoffeeScript files that use TestCafe API,
- TestCafe Studio tests (
.testcafe
files), - Legacy TestCafe v2015.1 tests.
You do not need to call this function if you specify the src property in the configuration file.
Related configuration file property: src
Examples
runner.src(['/home/user/js-tests/fixture.js', 'studio-fixture.testcafe']);
runner.src(['/home/user/tests/**/*.js', '!/home/user/tests/foo.js']);