diff --git a/tests/src/rules/newline-after-import.js b/tests/src/rules/newline-after-import.js index dc0d3d4059..bf91064f85 100644 --- a/tests/src/rules/newline-after-import.js +++ b/tests/src/rules/newline-after-import.js @@ -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';