Skip to content

Commit

Permalink
add checks for default exports
Browse files Browse the repository at this point in the history
  • Loading branch information
vikr01 committed Oct 29, 2018
1 parent 5caa2ea commit d13c122
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/src/rules/named.js
Expand Up @@ -208,6 +208,11 @@ ruleTester.run('named', rule, {
options: [{commonjs: false}],
}),

test({
code: 'const { default: defExport } = require("./bar")',
options: [{commonjs: true}],
}),

...SYNTAX_CASES,
],

Expand Down Expand Up @@ -281,6 +286,12 @@ ruleTester.run('named', rule, {
options: [{commonjs: true}],
}),

test({
code: 'const { default: defExport } = require("./named-exports")',
errors: [error('default', './named-exports')],
options: [{commonjs: true}],
}),

// parse errors
// test({
// code: "import { a } from './test.coffee';",
Expand Down

0 comments on commit d13c122

Please sign in to comment.