Skip to content

Commit 7446e80

Browse files
committed
Add long running test. Utilize cross-org standard workflow for ci..
1 parent c771385 commit 7446e80

File tree

5 files changed

+31
-87
lines changed

5 files changed

+31
-87
lines changed

.github/workflows/bun.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

.github/workflows/deno.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

.github/workflows/node.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
on:
2+
push:
3+
branches: [main, dev]
4+
pull_request:
5+
branches: [main, dev]
6+
7+
jobs:
8+
deno_ci:
9+
uses: cross-org/workflows/.github/workflows/deno-ci.yml@main
10+
with:
11+
entrypoint: mod.ts
12+
lint_docs: false
13+
bun_ci:
14+
uses: cross-org/workflows/.github/workflows/bun-ci.yml@main
15+
with:
16+
jsr_dependencies: "@std/assert"
17+
node_ci:
18+
uses: cross-org/workflows/.github/workflows/node-ci.yml@main
19+
with:
20+
test_target: "test/*.test.ts"
21+
jsr_dependencies: "@std/assert"

mod.test.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,22 @@ test("Multiplication with timeout", () => {
1111
assertEquals(5 * 4, 20);
1212
}, { timeout: 1000 });
1313

14-
// Test with done callback (useful for async operations)
15-
test("Async test", (_context, done) => {
14+
// Failing async test with done callback
15+
test("Long async test", (_context, done) => {
1616
setTimeout(() => {
1717
assertNotEquals(5, 4);
1818
done(); // Signal test completion
1919
}, 500);
2020
}, { waitForCallback: true });
2121

22+
// Test with done callback (useful for async operations)
23+
test("Async test", (_context, done) => {
24+
setTimeout(() => {
25+
assertNotEquals(5, 4);
26+
done(); // Signal test completion
27+
}, 4500);
28+
}, { waitForCallback: true, timeout: 5500 });
29+
2230
// Test async
2331
import { delay } from "@std/async";
2432
test("async hello world", async () => {

0 commit comments

Comments
 (0)