Skip to content

Commit

Permalink
Fix error message
Browse files Browse the repository at this point in the history
  • Loading branch information
papandreou committed Feb 13, 2019
1 parent 7c9b6dc commit a5fa46a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/rules/no-async-describe.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ module.exports = function (context) {
if (isAsyncFunction(fnArg)) {
context.report({
node: fnArg,
message: `Do not pass an async function to ${name}()`,
message: `Unexpected async function in ${name}()`,
fix(fixer) {
return fixAsyncFunction(fixer, fnArg);
}
Expand Down
10 changes: 5 additions & 5 deletions test/rules/no-async-describe.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ ruleTester.run('no-async-describe', rule, {
code: 'describe("hello", async function () {})',
output: 'describe("hello", function () {})',
parserOptions: { ecmaVersion: 8 }, errors: [ {
message: 'Do not pass an async function to describe()',
message: 'Unexpected async function in describe()',
line: 1,
column: 19
} ]
Expand All @@ -36,7 +36,7 @@ ruleTester.run('no-async-describe', rule, {
}
},
parserOptions: { ecmaVersion: 8 }, errors: [ {
message: 'Do not pass an async function to foo()',
message: 'Unexpected async function in foo()',
line: 1,
column: 14
} ]
Expand All @@ -46,7 +46,7 @@ ruleTester.run('no-async-describe', rule, {
output: 'describe("hello", () => {})',
parserOptions: { ecmaVersion: 8 },
errors: [ {
message: 'Do not pass an async function to describe()',
message: 'Unexpected async function in describe()',
line: 1,
column: 19
} ]
Expand All @@ -57,7 +57,7 @@ ruleTester.run('no-async-describe', rule, {
output: null,
parserOptions: { ecmaVersion: 8 },
errors: [ {
message: 'Do not pass an async function to describe()',
message: 'Unexpected async function in describe()',
line: 1,
column: 19
} ]
Expand All @@ -68,7 +68,7 @@ ruleTester.run('no-async-describe', rule, {
output: 'describe("hello", () => {async function bar() {await foo;}})',
parserOptions: { ecmaVersion: 8 },
errors: [ {
message: 'Do not pass an async function to describe()',
message: 'Unexpected async function in describe()',
line: 1,
column: 19
} ]
Expand Down

0 comments on commit a5fa46a

Please sign in to comment.