Add linting rule for cypress tests to reject .only calls
This commit is contained in:
parent
0cf39373da
commit
f080e946c4
|
|
@ -103,5 +103,12 @@ module.exports = {
|
||||||
caughtErrorsIgnorePattern: '^_',
|
caughtErrorsIgnorePattern: '^_',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
'no-restricted-syntax': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
selector: "CallExpression[callee.object.name=/^(describe|it|test)$/][callee.property.name='only']",
|
||||||
|
message: 'Found .only in test. Please remove it before committing.',
|
||||||
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue