Skip to content

Commit 628a731

Browse files
committed
fix test not running
1 parent 3adcfa2 commit 628a731

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/processScript/index.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -450,9 +450,11 @@ if (import.meta.vitest) {
450450
})
451451
}
452452

453-
const reassignmentTestSource = `export default () => { const i = 0; i = 1; }`
454-
455-
expect(async (): Promise<any> => await processScript(reassignmentTestSource, { scriptName: true, minify: false }))
456-
.rejects
457-
.toThrowError(`Reassignment to const variable i is not allowed!`)
453+
test(`reassigning const variable`, () => {
454+
const reassignmentTestSource = `export default () => { const i = 0; i = 1; }`
455+
456+
expect(async (): Promise<any> => await processScript(reassignmentTestSource, { scriptName: true, minify: false }))
457+
.rejects
458+
.toThrowError(`Reassignment to const variable i is not allowed!`)
459+
})
458460
}

0 commit comments

Comments
 (0)