File tree Expand file tree Collapse file tree 2 files changed +13
-6
lines changed
Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Original file line number Diff line number Diff line change 1+ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2+
3+ exports [` programmatic api works 1` ] = `
4+ {
5+ " script" : " function(){#4s.scripts.trust()}" ,
6+ " warnings" : [],
7+ }
8+ ` ;
Original file line number Diff line number Diff line change @@ -450,11 +450,10 @@ if (import.meta.vitest) {
450450 } )
451451 }
452452
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!` )
453+ test ( `programmatic api works` , async ( ) => {
454+ const source = `function () { #fs.scripts.trust() }`
455+ const processedScript = await processScript ( source , { scriptName : true } )
456+
457+ expect ( processedScript ) . toMatchSnapshot ( )
459458 } )
460459}
You can’t perform that action at this time.
0 commit comments