Skip to content

Commit

Permalink
Add test case for functions
Browse files Browse the repository at this point in the history
  • Loading branch information
levibuzolic committed Aug 15, 2024
1 parent 21613b2 commit 424419a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ ruleTester.run('no-only-tests', rules['no-only-tests'], {
options: [{focus: ['focus']}],
code: 'test.only("Options will exclude this from being caught", function() {});',
},
{
options: [{functions: ['fit', 'xit']}],
code: 'it("Options will exclude this from being caught", function() {});',
},
],

invalid: [
Expand Down Expand Up @@ -194,6 +198,11 @@ ruleTester.run('no-only-tests', rules['no-only-tests'], {
output: 'Then("Some assertion", function() {});',
errors: [{message: 'Then.only not permitted'}],
},
{
options: [{functions: ['fit', 'xit']}],
code: 'xit("No skipped tests", function() {});',
errors: [{message: 'xit not permitted'}],
},
],
});

Expand Down

0 comments on commit 424419a

Please sign in to comment.