Skip to content

Commit

Permalink
Tests example illustrating #1918
Browse files Browse the repository at this point in the history
  • Loading branch information
pkuczynski committed Oct 5, 2020
1 parent a00727e commit a2bf271
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions tests/src/rules/no-extraneous-dependencies.js
Expand Up @@ -315,6 +315,30 @@ ruleTester.run('no-extraneous-dependencies', rule, {
message: '\'not-a-dependency\' should be listed in the project\'s dependencies. Run \'npm i -S not-a-dependency\' to add it',
}],
}),
test({
code: 'const { v5 } = require("uuid")',
errors: [{
message: '\'uuid\' should be listed in the project\'s dependencies, not devDependencies.',
}],
}),
test({
code: 'import { v5 } from "uuid"',
errors: [{
message: '\'uuid\' should be listed in the project\'s dependencies, not devDependencies.',
}],
}),
test({
code: 'const v5 = require("uuid/v5")',
errors: [{
message: '\'uuid\' should be listed in the project\'s dependencies, not devDependencies.',
}],
}),
test({
code: 'import v5 from "uuid/v5"',
errors: [{
message: '\'uuid\' should be listed in the project\'s dependencies, not devDependencies.',
}],
}),
],
})

Expand Down

0 comments on commit a2bf271

Please sign in to comment.