Repository URL to install this package:
|
Version:
0.6.0 ▾
|
gateway-proxy
/
usr
/
share
/
gateway-proxy
/
app
/
node_modules
/
eslint-plugin-jest
/
docs
/
rules
/
no-test-prefixes.md
|
|---|
.only and .skip over f and x (no-test-prefixes)💼 This rule is enabled in the following
configs:
all, recommended.
🔧 This rule is automatically fixable using the --fix
option
on the command line.
Jest allows you to choose how you want to define focused and skipped tests, with multiple permutations for each:
it.only, test.only, describe.only, it.skip,
test.skip, describe.skip.fit, fdescribe, xit, xtest, xdescribe.This rule enforces usages from the only & skip list.
This rule triggers a warning if you use one of the keywords from the 'f' & 'x' list to focus/skip a test.
/*eslint jest/no-test-prefixes: "error"*/ it.only('foo'); // valid test.only('foo'); // valid describe.only('foo'); // valid it.skip('foo'); // valid test.skip('foo'); // valid describe.skip('foo'); // valid fit('foo'); // invalid fdescribe('foo'); // invalid xit('foo'); // invalid xtest('foo'); // invalid xdescribe('foo'); // invalid