@@ -15,8 +15,11 @@ import {
1515 DEBUG_TEST_ENABLED ,
1616} from './util.js' ;
1717
18+ // Enable retries for individual tests if weval is under test
19+ const TEST_OPTS = WEVAL_TEST_ENABLED ? { retry : 3 } : undefined ;
20+
1821suite ( 'WASI' , ( ) => {
19- test ( 'basic app (old API)' , async ( ) => {
22+ test ( 'basic app (old API)' , TEST_OPTS , async ( ) => {
2023 const { instance } = await setupComponent ( {
2124 componentize : {
2225 src : `
@@ -58,7 +61,7 @@ suite('WASI', () => {
5861 assert . strictEqual ( result . split ( ',' ) . length , 3 ) ;
5962 } ) ;
6063
61- test ( 'basic app (OriginalSourceFile API)' , async ( ) => {
64+ test ( 'basic app (OriginalSourceFile API)' , TEST_OPTS , async ( ) => {
6265 const { instance } = await setupComponent ( {
6366 componentize : {
6467 opts : {
@@ -104,7 +107,7 @@ async function setupComponent(opts) {
104107 throw new Error ( 'no componentize options or src provided' ) ;
105108 }
106109
107- const outputDir = join ( './out' , 'wasi-test' ) ;
110+ const outputDir = join ( './out' , 'wasi-test' ) ;
108111 await mkdir ( outputDir , { recursive : true } ) ;
109112
110113 await writeFile ( join ( outputDir , 'wasi.component.wasm' ) , component ) ;
0 commit comments