@@ -15,8 +15,11 @@ import {
15
15
DEBUG_TEST_ENABLED ,
16
16
} from './util.js' ;
17
17
18
+ // Enable retries for individual tests if weval is under test
19
+ const TEST_OPTS = WEVAL_TEST_ENABLED ? { retry : 3 } : undefined ;
20
+
18
21
suite ( 'WASI' , ( ) => {
19
- test ( 'basic app (old API)' , async ( ) => {
22
+ test ( 'basic app (old API)' , TEST_OPTS , async ( ) => {
20
23
const { instance } = await setupComponent ( {
21
24
componentize : {
22
25
src : `
@@ -58,7 +61,7 @@ suite('WASI', () => {
58
61
assert . strictEqual ( result . split ( ',' ) . length , 3 ) ;
59
62
} ) ;
60
63
61
- test ( 'basic app (OriginalSourceFile API)' , async ( ) => {
64
+ test ( 'basic app (OriginalSourceFile API)' , TEST_OPTS , async ( ) => {
62
65
const { instance } = await setupComponent ( {
63
66
componentize : {
64
67
opts : {
@@ -104,7 +107,7 @@ async function setupComponent(opts) {
104
107
throw new Error ( 'no componentize options or src provided' ) ;
105
108
}
106
109
107
- const outputDir = join ( './out' , 'wasi-test' ) ;
110
+ const outputDir = join ( './out' , 'wasi-test' ) ;
108
111
await mkdir ( outputDir , { recursive : true } ) ;
109
112
110
113
await writeFile ( join ( outputDir , 'wasi.component.wasm' ) , component ) ;
0 commit comments