We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3adcfa2 commit 628a731Copy full SHA for 628a731
src/processScript/index.ts
@@ -450,9 +450,11 @@ if (import.meta.vitest) {
450
})
451
}
452
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!`)
+ test(`reassigning const variable`, () => {
+ const reassignmentTestSource = `export default () => { const i = 0; i = 1; }`
+
+ expect(async (): Promise<any> => await processScript(reassignmentTestSource, { scriptName: true, minify: false }))
+ .rejects
458
+ .toThrowError(`Reassignment to const variable i is not allowed!`)
459
+ })
460
0 commit comments