Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
pri1311 committed Mar 29, 2022
1 parent a1cfdc3 commit 9857420
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions tests/src/rules/newline-after-import.js
Expand Up @@ -321,20 +321,31 @@ ruleTester.run('newline-after-import', require('rules/newline-after-import'), {
`,
parserOptions: { ecmaVersion: 2015, sourceType: 'module' } ,
},
),

invalid: [].concat(
{
code: `
import { A, B, C, D } from
'../path/to/my/module/in/very/far/directory'
// some comment
var foo = 'bar';
`,
output: `
import { A, B, C, D } from
'../path/to/my/module/in/very/far/directory'
// some comment
var foo = 'bar';
`,
errors: [ {
line: 3,
column: 1,
message: IMPORT_ERROR_MESSAGE,
} ],
parserOptions: { ecmaVersion: 2015, sourceType: 'module' },
options: [{ 'considerComments': true }],
},
),

invalid: [].concat(
{
code: `
import path from 'path';
Expand Down

0 comments on commit 9857420

Please sign in to comment.