Skip to content

Commit e5d68e1

Browse files
wip: start testing async sleep post return
1 parent b6b57a6 commit e5d68e1

File tree

4 files changed

+27
-1
lines changed

4 files changed

+27
-1
lines changed
Binary file not shown.
Binary file not shown.

packages/jco/test/p3/ported/wasmtime/component-async/post-return.js

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { testComponent, composeCallerCallee, COMPONENT_FIXTURES_DIR } from "./co
99
// In the upstream wasmtime repo, see:
1010
// wasmtime/crates/misc/component-async-tests/tests/scenario/post_return.rs
1111
//
12-
suite('post-return scenario', () => {
12+
suite.skip('post-return scenario', () => {
1313
test('caller & callee', async () => {
1414
const callerPath = join(
1515
COMPONENT_FIXTURES_DIR,
@@ -26,3 +26,26 @@ suite('post-return scenario', () => {
2626
await testComponent({ componentPath });
2727
});
2828
});
29+
30+
// These tests are ported from upstream wasmtime's component-async-tests
31+
//
32+
// In the upstream wasmtime repo, see:
33+
// wasmtime/crates/misc/component-async-tests/tests/scenario/post_return.rs
34+
//
35+
suite('post-return async sleep scenario', () => {
36+
test('caller & callee', async () => {
37+
const callerPath = join(
38+
COMPONENT_FIXTURES_DIR,
39+
"p3/general/async-sleep-post-return-caller.wasm"
40+
);
41+
const calleePath = join(
42+
COMPONENT_FIXTURES_DIR,
43+
"p3/general/async-sleep-post-return-callee.wasm"
44+
);
45+
const componentPath = await composeCallerCallee({
46+
callerPath,
47+
calleePath,
48+
});
49+
await testComponent({ componentPath });
50+
});
51+
});

packages/jco/test/p3/transpile.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ const P3_FIXTURE_COMPONENTS = [
3636
'general/async-post-return-caller.wasm',
3737
'general/async-post-return-callee.wasm',
3838

39+
'general/async-sleep-post-return-caller.wasm',
40+
'general/async-sleep-post-return-callee.wasm',
41+
3942
'general/async_borrowing_caller.component.wasm',
4043
'general/async_borrowing_callee.component.wasm',
4144
'general/async_intertask_communication.component.wasm',

0 commit comments

Comments
 (0)