Skip to content

Commit

Permalink
exploratory tests for #333. already passing?
Browse files Browse the repository at this point in the history
  • Loading branch information
benmosher committed Jun 21, 2016
1 parent e688f15 commit bfbe89d
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion tests/src/rules/no-unresolved.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ function runResolverTests(resolver) {
, options: [{ commonjs: true }]}),
rest({ code: 'require(foo)'
, options: [{ commonjs: true }]}),

],

invalid: [
Expand Down Expand Up @@ -184,6 +183,22 @@ function runResolverTests(resolver) {
}),
],
})

ruleTester.run(`issue #333 (${resolver})`, rule, {
valid: [
rest({ code: 'import foo from "./bar.json"' }),
rest({
code: 'import foo from "./bar.json"',
settings: { 'import/extensions': ['.js'] },
}),
],
invalid: [
rest({
code: 'import bar from "./foo.json"',
errors: ["Unable to resolve path to module './foo.json'."],
}),
],
})
}

['node', 'webpack'].forEach(runResolverTests)
Expand Down

0 comments on commit bfbe89d

Please sign in to comment.