Skip to content

Commit 38e483e

Browse files
committed
test: add
thanks to @btea
1 parent 0f2df77 commit 38e483e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

packages/compiler-sfc/__tests__/rewriteDefault.spec.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@ describe('compiler sfc: rewriteDefault', () => {
2323
).toMatchInlineSnapshot(`"const script = {}"`)
2424
})
2525

26+
test('rewrite variable value default', () => {
27+
expect(compileRewriteDefault(`export const foo = 'default'`, 'script'))
28+
.toMatchInlineSnapshot(`
29+
"export const foo = 'default'
30+
const script = {}"
31+
`)
32+
})
33+
2634
test('rewrite export named default', () => {
2735
expect(
2836
compileRewriteDefault(

0 commit comments

Comments
 (0)