Skip to content

Commit

Permalink
Chore: Fix typos in test option assertions (#8305)
Browse files Browse the repository at this point in the history
Some properties of rule tests contained typos, so the tests were not asserting what we thought they were. This commit updates the tests to fix the typos.
  • Loading branch information
not-an-aardvark committed Mar 22, 2017
1 parent 79a97cb commit c4ffb49
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions tests/lib/rules/array-bracket-spacing.js
Expand Up @@ -695,7 +695,7 @@ ruleTester.run("array-bracket-spacing", rule, {
code: "([ a, b ]: Array<any>) => {}",
output: "([a, b]: Array<any>) => {}",
options: ["never"],
ecmaFeatures: {
parserOptions: {
ecmaVersion: 6
},
errors: [
Expand All @@ -718,7 +718,7 @@ ruleTester.run("array-bracket-spacing", rule, {
code: "([a, b]: Array< any >) => {}",
output: "([ a, b ]: Array< any >) => {}",
options: ["always"],
ecmaFeatures: {
parserOptions: {
ecmaVersion: 6
},
errors: [
Expand Down
10 changes: 5 additions & 5 deletions tests/lib/rules/no-restricted-modules.js
Expand Up @@ -26,11 +26,11 @@ ruleTester.run("no-restricted-modules", rule, {
{ code: "require(2)", options: ["crypto"] },
{ code: "require(foo)", options: ["crypto"] },
{ code: "var foo = bar('crypto');", options: ["crypto"] },
{ code: "require(\"foo/bar\");", option: ["foo"] },
{ code: "var withPaths = require(\"foo/bar\");", option: [{ paths: ["foo", "bar"] }] },
{ code: "var withPatterns = require(\"foo/bar\");", option: [{ patterns: ["foo/c*"] }] },
{ code: "var withPatternsAndPaths = require(\"foo/bar\");", option: [{ paths: ["foo"], patterns: ["foo/c*"] }] },
{ code: "var withGitignores = require(\"foo/bar\");", option: [{ paths: ["foo"], patterns: ["foo/*", "!foo/bar"] }] }
{ code: "require(\"foo/bar\");", options: ["foo"] },
{ code: "var withPaths = require(\"foo/bar\");", options: [{ paths: ["foo", "bar"] }] },
{ code: "var withPatterns = require(\"foo/bar\");", options: [{ patterns: ["foo/c*"] }] },
{ code: "var withPatternsAndPaths = require(\"foo/bar\");", options: [{ paths: ["foo"], patterns: ["foo/c*"] }] },
{ code: "var withGitignores = require(\"foo/bar\");", options: [{ paths: ["foo"], patterns: ["foo/*", "!foo/bar"] }] }
],
invalid: [{
code: "require(\"fs\")",
Expand Down
2 changes: 1 addition & 1 deletion tests/lib/rules/no-restricted-properties.js
Expand Up @@ -108,7 +108,7 @@ ruleTester.run("no-restricted-properties", rule, {
options: [{ object: "foo", property: "bar" }],
parserOptions: { ecmaVersion: 6 }
}, {
code: "let {baz: {bar: qux}} = foo;", property: "bar",
code: "let {baz: {bar: qux}} = foo;",
options: [{ object: "foo", property: "bar" }],
parserOptions: { ecmaVersion: 6 }
}, {
Expand Down

0 comments on commit c4ffb49

Please sign in to comment.