Skip to content

Commit e2dfcbf

Browse files
fix(tests): enable retry for weval
1 parent a0fb0c4 commit e2dfcbf

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

test/wasi.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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+
1821
suite('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

Comments
 (0)