Skip to content

Commit

Permalink
Add test for fixer output
Browse files Browse the repository at this point in the history
  • Loading branch information
textbook committed Jun 18, 2019
1 parent 620fbb7 commit 65fda53
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions tests/lib/rules/no-skipped-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ var rule = require('../../../lib/rules/no-skipped-tests');

var ruleTester = new RuleTester();

function invalidScenario (code) {
function invalidScenario(input, output) {
return {
code: code,
code: input,
parserOptions: { ecmaVersion: 6 },
errors: [
{ message: 'Unexpected skipped test' }
]
],
output: output
};
}

Expand All @@ -21,7 +22,13 @@ ruleTester.run('no-skipped-tests', rule, {
'Scenario("this is cool", function () {});'
],
invalid: [
invalidScenario('xScenario("this is not", function () {});'),
invalidScenario('Scenario.skip("nor is this", function () {});')
],
invalidScenario(
'xScenario("this is not", function () {});',
'Scenario("this is not", function () {});'
),
invalidScenario(
'Scenario.skip("nor is this", function () {});',
'Scenario("nor is this", function () {});'
)
],
});

0 comments on commit 65fda53

Please sign in to comment.