Skip to content

Commit 636b429

Browse files
Upgraded bun to 1.0.1
1 parent 247cadf commit 636b429

File tree

6 files changed

+18
-8
lines changed

6 files changed

+18
-8
lines changed

.github/workflows/ci_bun.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,17 @@ jobs:
2020
- name: Setup Bun
2121
uses: oven-sh/setup-bun@v1
2222
with:
23-
bun-version: "0.5.9"
23+
bun-version: "1.0.1"
2424

2525
- name: Cache Dependencies
2626
uses: actions/cache@v3
2727
with:
2828
path: |
2929
~/.bun/install/cache
3030
~/work/react-assert/react-assert/bun.lockb
31-
key: ${{ runner.os }}-bun-cache-v3-${{ hashFiles('package.json') }}
31+
key: ${{ runner.os }}-bun-cache-v4-${{ hashFiles('package.json') }}
3232
restore-keys: |
33-
${{ runner.os }}-bun-cache-v3-
33+
${{ runner.os }}-bun-cache-v4-
3434
3535
- name: Run tests
3636
run: |

test/TestErrorBoundary.test.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@ import { assertComponents, TestErrorBoundary } from "../index.mjs";
77
const h = React.createElement;
88

99
const { describe, it } = await (async () => {
10+
// @ts-ignore
11+
const module = process.isBun ? "bun:test" : "node:test";
1012
// @ts-ignore
1113
return process.isBun // @ts-ignore
1214
? Promise.resolve({ describe: (_, fn) => fn(), it: test })
13-
: import("node:test");
15+
: import(module);
1416
})();
1517

1618
describe("TestErrorBoundary.test.mjs", () => {

test/assertComponent.test.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@ import { TestComp, TestComp2 } from "./testComponents.mjs";
55

66
import { strict as assert } from "node:assert";
77
const { describe, it } = await (async () => {
8+
// @ts-ignore
9+
const module = process.isBun ? "bun:test" : "node:test";
810
// @ts-ignore
911
return process.isBun // @ts-ignore
1012
? Promise.resolve({ describe: (_, fn) => fn(), it: test })
11-
: import("node:test");
13+
: import(module);
1214
})();
1315

1416
const h = React.createElement;

test/assertComponents.test.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@ import { TestComp, TestComp2 } from "./testComponents.mjs";
55

66
import { strict as assert } from "node:assert";
77
const { describe, it } = await (async () => {
8+
// @ts-ignore
9+
const module = process.isBun ? "bun:test" : "node:test";
810
// @ts-ignore
911
return process.isBun // @ts-ignore
1012
? Promise.resolve({ describe: (_, fn) => fn(), it: test })
11-
: import("node:test");
13+
: import(module);
1214
})();
1315

1416
const h = React.createElement;

test/mockComponent.test.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ import { mockComponent } from "../index.mjs";
44
import { TestComp } from "./testComponents.mjs";
55

66
const { describe, it } = await (async () => {
7+
// @ts-ignore
8+
const module = process.isBun ? "bun:test" : "node:test";
79
// @ts-ignore
810
return process.isBun // @ts-ignore
911
? Promise.resolve({ describe: (_, fn) => fn(), it: test })
10-
: import("node:test");
12+
: import(module);
1113
})();
1214

1315
const h = React.createElement;

test/testRenderer.test.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ import { TestComp, TestComp2 } from "./testComponents.mjs";
44

55
import { strict as assert } from "node:assert";
66
const { describe, it } = await (async () => {
7+
// @ts-ignore
8+
const module = process.isBun ? "bun:test" : "node:test";
79
// @ts-ignore
810
return process.isBun // @ts-ignore
911
? Promise.resolve({ describe: (_, fn) => fn(), it: test })
10-
: import("node:test");
12+
: import(module);
1113
})();
1214

1315
const h = React.createElement;

0 commit comments

Comments
 (0)