Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions test/wasi/test-wasi-cant_dotdot.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
'use strict';

// Tests test/wasi/wasm/cant_dotdot.wasm, see test/wasi/c/cant_dotdot.c
require('../common');
const { testWasiPreview1 } = require('../common/wasi');

testWasiPreview1(['cant_dotdot']);
8 changes: 8 additions & 0 deletions test/wasi/test-wasi-clock_getres.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
'use strict';

// Tests test/wasi/wasm/clock_getres.wasm, see test/wasi/c/clock_getres.c
require('../common');
const { testWasiPreview1 } = require('../common/wasi');

// This test is currently unsupported on IBM i PASE
testWasiPreview1(['clock_getres']);
7 changes: 7 additions & 0 deletions test/wasi/test-wasi-fd_prestat_get_refresh.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
'use strict';

// Tests test/wasi/wasm/fd_prestat_get_refresh.wasm, see test/wasi/c/fd_prestat_get_refresh.c
require('../common');
const { testWasiPreview1 } = require('../common/wasi');

testWasiPreview1(['fd_prestat_get_refresh']);
7 changes: 7 additions & 0 deletions test/wasi/test-wasi-ftruncate.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
'use strict';

// Tests test/wasi/wasm/ftruncate.wasm, see test/wasi/c/ftruncate.c
require('../common');
const { testWasiPreview1 } = require('../common/wasi');

testWasiPreview1(['ftruncate']);
7 changes: 7 additions & 0 deletions test/wasi/test-wasi-getentropy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
'use strict';

// Tests test/wasi/wasm/getentropy.wasm, see test/wasi/c/getentropy.c
require('../common');
const { testWasiPreview1 } = require('../common/wasi');

testWasiPreview1(['getentropy']);
7 changes: 7 additions & 0 deletions test/wasi/test-wasi-getrusage.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
'use strict';

// Tests test/wasi/wasm/getrusage.wasm, see test/wasi/c/getrusage.c
require('../common');
const { testWasiPreview1 } = require('../common/wasi');

testWasiPreview1(['getrusage']);
7 changes: 7 additions & 0 deletions test/wasi/test-wasi-gettimeofday.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
'use strict';

// Tests test/wasi/wasm/gettimeofday.wasm, see test/wasi/c/gettimeofday.c
require('../common');
const { testWasiPreview1 } = require('../common/wasi');

testWasiPreview1(['gettimeofday']);
7 changes: 7 additions & 0 deletions test/wasi/test-wasi-main_args.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
'use strict';

// Tests test/wasi/wasm/main_args.wasm, see test/wasi/c/main_args.c
require('../common');
const { testWasiPreview1 } = require('../common/wasi');

testWasiPreview1(['main_args']);
7 changes: 7 additions & 0 deletions test/wasi/test-wasi-notdir.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
'use strict';

// Tests test/wasi/wasm/notdir.wasm, see test/wasi/c/notdir.c
require('../common');
const { testWasiPreview1 } = require('../common/wasi');

testWasiPreview1(['notdir']);
7 changes: 7 additions & 0 deletions test/wasi/test-wasi-preopen_populates.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
'use strict';

// Tests test/wasi/wasm/preopen_populates.wasm, see test/wasi/c/preopen_populates.c
require('../common');
const { testWasiPreview1 } = require('../common/wasi');

testWasiPreview1(['preopen_populates']);
7 changes: 7 additions & 0 deletions test/wasi/test-wasi-pthread.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
'use strict';

// Tests test/wasi/wasm/pthread.wasm, see test/wasi/c/pthread.c
require('../common');
const { testWasiPreview1 } = require('../common/wasi');

testWasiPreview1(['--target=wasm32-wasip1-threads', 'pthread']);
7 changes: 7 additions & 0 deletions test/wasi/test-wasi-readdir.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
'use strict';

// Tests test/wasi/wasm/readdir.wasm, see test/wasi/c/readdir.c
require('../common');
const { testWasiPreview1 } = require('../common/wasi');

testWasiPreview1(['readdir']);
7 changes: 7 additions & 0 deletions test/wasi/test-wasi-sock.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
'use strict';

// Tests test/wasi/wasm/sock.wasm, see test/wasi/c/sock.c
require('../common');
const { testWasiPreview1 } = require('../common/wasi');

testWasiPreview1(['sock']);
7 changes: 7 additions & 0 deletions test/wasi/test-wasi-stat.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
'use strict';

// Tests test/wasi/wasm/stat.wasm, see test/wasi/c/stat.c
require('../common');
const { testWasiPreview1 } = require('../common/wasi');

testWasiPreview1(['stat']);
7 changes: 7 additions & 0 deletions test/wasi/test-wasi-write_file.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
'use strict';

// Tests test/wasi/wasm/write_file.wasm, see test/wasi/c/write_file.c
require('../common');
const { testWasiPreview1 } = require('../common/wasi');

testWasiPreview1(['write_file']);
29 changes: 0 additions & 29 deletions test/wasi/test-wasi.js

This file was deleted.

12 changes: 12 additions & 0 deletions test/wasi/wasi.status
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,15 @@ prefix wasi

[true] # This section applies to all platforms

[$system==ibmi]
# Unsupported on IBM i PASE
test-wasi-clock_getres: SKIP
test-wasi-getrusage: SKIP

[$system==win32 || $system==android]
# Unsupported on Windows and Android
test-wasi-readdir: SKIP
Comment on lines +9 to +16
Copy link
Contributor

@aduh95 aduh95 Aug 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we use common.skip() in the test files instead so it works even without using the Python test runner?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using common.skip() is less desirable than using the status file, and should only be reserved in cases where the status file isn't powerful enough to express the skip condition IMO. For example imagine when this test becomes supported on Windows, to validate whether it works locally, people can just run it without modifying the tests, and remove the condition of the status file instead of modifying the tests to turn it on. I can't think of a use case where forcing the test to be skipped on Windows even when people are intentionally running the test directly is desirable.


[$system==linux]
# https://github.com/nodejs/node/issues/59146
test-wasi-pthread: PASS, FLAKY
Loading