Skip to content

Commit

Permalink
Add regression test
Browse files Browse the repository at this point in the history
  • Loading branch information
ertrzyiks committed Apr 13, 2021
1 parent e871a9a commit 592a40c
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions tests/src/rules/no-duplicates.js
Expand Up @@ -48,6 +48,49 @@ ruleTester.run('no-duplicates', rule, {
test({
code: "import {y} from './foo'; import * as ns from './foo'",
}),

// #2027 long import list generate empty lines
test({
code: `
import { One } from '../fragments/one'
import { Two } from '../fragments/two'
import { Three } from '../fragments/three'
import { Four } from '../fragments/four'
import { Five } from '../fragments/five'
import { Six } from '../fragments/six'
import { Seven } from '../fragments/seven'
import { Eight } from '../fragments/eight'
import { Nine } from '../fragments/nine'
import { Ten } from '../fragments/ten'
import { Eleven } from '../fragments/eleven'
import { OneDoc } from '../fragments/one'
import { TwoDoc } from '../fragments/two'
import { ThreeDoc } from '../fragments/three'
import { FourDoc } from '../fragments/four'
import { FiveDoc } from '../fragments/five'
import { SixDoc } from '../fragments/six'
import { SevenDoc } from '../fragments/seven'
import { EightDoc } from '../fragments/eight'
import { NineDoc } from '../fragments/nine'
import { TenDoc } from '../fragments/ten'
import { ElevenDoc } from '../fragments/eleven'
export const vars = {}
`,
output: `
import { One, OneDoc } from '../fragments/one'
import { Two, TwoDoc } from '../fragments/two'
import { Three, ThreeDoc } from '../fragments/three'
import { Four, FourDoc } from '../fragments/four'
import { Five, FiveDoc } from '../fragments/five'
import { Six, SixDoc } from '../fragments/six'
import { Seven, SevenDoc } from '../fragments/seven'
import { Eight, EightDoc } from '../fragments/eight'
import { Nine, NineDoc } from '../fragments/nine'
import { Ten, TenDoc } from '../fragments/ten'
import { Eleven, ElevenDoc } from '../fragments/eleven'
export const vars = {}
`,
}),
],
invalid: [
test({
Expand Down

0 comments on commit 592a40c

Please sign in to comment.