Skip to content

Commit 82a1d19

Browse files
test(jco): run p3 stream tests in parallel w/ diff instantiations
1 parent 5b5f9d5 commit 82a1d19

1 file changed

Lines changed: 17 additions & 17 deletions

File tree

packages/jco/test/p3/stream.js

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ suite("stream<T> lifts", () => {
3939
instance = await esModule.instantiate(undefined, new WASIShim().getImportObject());
4040
});
4141

42-
test("u32/s32", async () => {
42+
test.concurrent("u32/s32", async () => {
4343
assert.instanceOf(instance["jco:test-components/get-stream-async"].getStreamU32, AsyncFunction);
4444
assert.instanceOf(instance["jco:test-components/get-stream-async"].getStreamS32, AsyncFunction);
4545

@@ -52,14 +52,14 @@ suite("stream<T> lifts", () => {
5252
await checkStreamValues({ stream, vals, typeName: "s32" });
5353
});
5454

55-
test("bool", async () => {
55+
test.concurrent("bool", async () => {
5656
assert.instanceOf(instance["jco:test-components/get-stream-async"].getStreamBool, AsyncFunction);
5757
const vals = [true, false];
5858
const stream = await instance["jco:test-components/get-stream-async"].getStreamBool(vals);
5959
await checkStreamValues({ stream, vals, typeName: "bool" });
6060
});
6161

62-
test("u16/s16", async () => {
62+
test.concurrent("u16/s16", async () => {
6363
assert.instanceOf(instance["jco:test-components/get-stream-async"].getStreamU16, AsyncFunction);
6464
assert.instanceOf(instance["jco:test-components/get-stream-async"].getStreamS16, AsyncFunction);
6565

@@ -74,7 +74,7 @@ suite("stream<T> lifts", () => {
7474
// TODO(fix): under/overflowing values hang
7575
});
7676

77-
test("u64/s64", async () => {
77+
test.concurrent("u64/s64", async () => {
7878
assert.instanceOf(instance["jco:test-components/get-stream-async"].getStreamU64, AsyncFunction);
7979
assert.instanceOf(instance["jco:test-components/get-stream-async"].getStreamS64, AsyncFunction);
8080

@@ -107,7 +107,7 @@ suite("stream<T> lifts", () => {
107107
// assert.equal(vals[4], await stream.next());
108108
});
109109

110-
test("f32/f64", async () => {
110+
test.concurrent("f32/f64", async () => {
111111
assert.instanceOf(instance["jco:test-components/get-stream-async"].getStreamF64, AsyncFunction);
112112
assert.instanceOf(instance["jco:test-components/get-stream-async"].getStreamF32, AsyncFunction);
113113

@@ -130,15 +130,15 @@ suite("stream<T> lifts", () => {
130130
assert.closeTo(vals[5], await stream.next(), 0.00001);
131131
});
132132

133-
test("string", async () => {
133+
test.concurrent("string", async () => {
134134
assert.instanceOf(instance["jco:test-components/get-stream-async"].getStreamString, AsyncFunction);
135135

136136
let vals = ["hello", "world", "!"];
137137
let stream = await instance["jco:test-components/get-stream-async"].getStreamString(vals);
138138
await checkStreamValues({ stream, vals, typeName: "string" });
139139
});
140140

141-
test("record", async () => {
141+
test.concurrent("record", async () => {
142142
assert.instanceOf(instance["jco:test-components/get-stream-async"].getStreamRecord, AsyncFunction);
143143

144144
let vals = [
@@ -150,7 +150,7 @@ suite("stream<T> lifts", () => {
150150
await checkStreamValues({ stream, vals, typeName: "record", assertEqFn: assert.deepEqual });
151151
});
152152

153-
test("variant", async () => {
153+
test.concurrent("variant", async () => {
154154
assert.instanceOf(instance["jco:test-components/get-stream-async"].getStreamVariant, AsyncFunction);
155155

156156
const vals = [
@@ -170,7 +170,7 @@ suite("stream<T> lifts", () => {
170170
assert.deepEqual(await stream.next(), vals[4]);
171171
});
172172

173-
test("tuple", async () => {
173+
test.concurrent("tuple", async () => {
174174
assert.instanceOf(instance["jco:test-components/get-stream-async"].getStreamTuple, AsyncFunction);
175175

176176
let vals = [
@@ -182,7 +182,7 @@ suite("stream<T> lifts", () => {
182182
await checkStreamValues({ stream, vals, typeName: "tuple", assertEqFn: assert.deepEqual });
183183
});
184184

185-
test("flags", async () => {
185+
test.concurrent("flags", async () => {
186186
assert.instanceOf(instance["jco:test-components/get-stream-async"].getStreamFlags, AsyncFunction);
187187

188188
let vals = [
@@ -194,15 +194,15 @@ suite("stream<T> lifts", () => {
194194
await checkStreamValues({ stream, vals, typeName: "flags", assertEqFn: assert.deepEqual });
195195
});
196196

197-
test("enum", async () => {
197+
test.concurrent("enum", async () => {
198198
assert.instanceOf(instance["jco:test-components/get-stream-async"].getStreamEnum, AsyncFunction);
199199

200200
let vals = ["first", "second", "third"];
201201
let stream = await instance["jco:test-components/get-stream-async"].getStreamEnum(vals);
202202
await checkStreamValues({ stream, vals, typeName: "enum", assertEqFn: assert.deepEqual });
203203
});
204204

205-
test("option<string>", async () => {
205+
test.concurrent("option<string>", async () => {
206206
assert.instanceOf(instance["jco:test-components/get-stream-async"].getStreamOptionString, AsyncFunction);
207207

208208
let vals = ["present string", null];
@@ -220,7 +220,7 @@ suite("stream<T> lifts", () => {
220220
});
221221
});
222222

223-
test("list<u8>", async () => {
223+
test.concurrent("list<u8>", async () => {
224224
assert.instanceOf(instance["jco:test-components/get-stream-async"].getStreamListU8, AsyncFunction);
225225
let vals = [[0x01, 0x02, 0x03, 0x04, 0x05], new Uint8Array([0x05, 0x04, 0x03, 0x02, 0x01]), []];
226226
let stream = await instance["jco:test-components/get-stream-async"].getStreamListU8(vals);
@@ -238,14 +238,14 @@ suite("stream<T> lifts", () => {
238238
});
239239
});
240240

241-
test("list<string>", async () => {
241+
test.concurrent("list<string>", async () => {
242242
assert.instanceOf(instance["jco:test-components/get-stream-async"].getStreamListString, AsyncFunction);
243243
let vals = [["first", "second", "third"], []];
244244
let stream = await instance["jco:test-components/get-stream-async"].getStreamListString(vals);
245245
await checkStreamValues({ stream, vals, typeName: "list<string>", assertEqFn: assert.deepEqual });
246246
});
247247

248-
test("list<u32, 5>", async () => {
248+
test.concurrent("list<u32, 5>", async () => {
249249
assert.instanceOf(instance["jco:test-components/get-stream-async"].getStreamFixedListU32, AsyncFunction);
250250
let vals = [
251251
[1, 2, 3, 4, 5],
@@ -256,7 +256,7 @@ suite("stream<T> lifts", () => {
256256
// TODO: test misuse of fixed length list
257257
});
258258

259-
test("list<record>", async () => {
259+
test.concurrent("list<record>", async () => {
260260
assert.instanceOf(instance["jco:test-components/get-stream-async"].getStreamListRecord, AsyncFunction);
261261
let vals = [
262262
[{ id: 1, idStr: "one" }],
@@ -275,7 +275,7 @@ suite("stream<T> lifts", () => {
275275
await checkStreamValues({ stream, vals, typeName: "list<record>", assertEqFn: assert.deepEqual });
276276
});
277277

278-
test("result<string>", async () => {
278+
test.concurrent("result<string>", async () => {
279279
assert.instanceOf(instance["jco:test-components/get-stream-async"].getStreamResultString, AsyncFunction);
280280
let vals = [
281281
{ tag: "ok", val: "present string" },

0 commit comments

Comments
 (0)