Skip to content

Commit

Permalink
Adjust tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sergei-startsev committed Jan 22, 2019
1 parent fca6308 commit acb20e5
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions tests/src/rules/no-unresolved.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,11 +213,6 @@ function runResolverTests(resolver) {
code: 'import foo from "./jsx/MyUncoolComponent.jsx"',
options: [{ caseSensitive: false }],
}),
// #1259 issue
rest({ // test with explicit flag
code: `import foo from "${mismatchedPath}"`,
options: [{ caseSensitive: true }],
}),
],

invalid: [
Expand All @@ -230,8 +225,20 @@ function runResolverTests(resolver) {
options: [{ caseSensitive: true }],
errors: [`Casing of ./jsx/MyUncoolComponent.jsx does not match the underlying filesystem.`],
}),
],
})

ruleTester.run('case sensitivity strict', rule, {
valid: [
// #1259 issue
rest({ // caseSensitiveStrict is disabled by default
code: `import foo from "${mismatchedPath}"`,
}),
],

invalid: [
// #1259 issue
rest({ // test with explicit flag
rest({ // test with enabled caseSensitiveStrict option
code: `import foo from "${mismatchedPath}"`,
options: [{ caseSensitiveStrict: true }],
errors: [`Casing of ${mismatchedPath} does not match the underlying filesystem.`],
Expand Down

0 comments on commit acb20e5

Please sign in to comment.