Skip to content

Commit

Permalink
test(compiler-core): add test for identifier collision
Browse files Browse the repository at this point in the history
  • Loading branch information
znck committed Nov 10, 2022
1 parent 001184e commit 28c8795
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/compiler-sfc/__tests__/rewriteDefault.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,18 @@ describe('compiler sfc: rewriteDefault', () => {
export { bar, } from './index.js'
const script = foo"
`)

expect(
rewriteDefault(
`export { foo as default } from './index.js' \n const foo = 1`,
'script'
)
).toMatchInlineSnapshot(`
"import { foo } from './index.js'
export { } from './index.js'
const foo = 1
const script = foo"
`)
})

test('export default class', async () => {
Expand Down

0 comments on commit 28c8795

Please sign in to comment.