Skip to content

Commit

Permalink
Upgraded bun to 1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
viktor-podzigun committed Sep 29, 2023
1 parent 247cadf commit 636b429
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci_bun.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@ jobs:
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: "0.5.9"
bun-version: "1.0.1"

- name: Cache Dependencies
uses: actions/cache@v3
with:
path: |
~/.bun/install/cache
~/work/react-assert/react-assert/bun.lockb
key: ${{ runner.os }}-bun-cache-v3-${{ hashFiles('package.json') }}
key: ${{ runner.os }}-bun-cache-v4-${{ hashFiles('package.json') }}
restore-keys: |
${{ runner.os }}-bun-cache-v3-
${{ runner.os }}-bun-cache-v4-
- name: Run tests
run: |
Expand Down
4 changes: 3 additions & 1 deletion test/TestErrorBoundary.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ import { assertComponents, TestErrorBoundary } from "../index.mjs";
const h = React.createElement;

const { describe, it } = await (async () => {
// @ts-ignore
const module = process.isBun ? "bun:test" : "node:test";
// @ts-ignore
return process.isBun // @ts-ignore
? Promise.resolve({ describe: (_, fn) => fn(), it: test })
: import("node:test");
: import(module);
})();

describe("TestErrorBoundary.test.mjs", () => {
Expand Down
4 changes: 3 additions & 1 deletion test/assertComponent.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ import { TestComp, TestComp2 } from "./testComponents.mjs";

import { strict as assert } from "node:assert";
const { describe, it } = await (async () => {
// @ts-ignore
const module = process.isBun ? "bun:test" : "node:test";
// @ts-ignore
return process.isBun // @ts-ignore
? Promise.resolve({ describe: (_, fn) => fn(), it: test })
: import("node:test");
: import(module);
})();

const h = React.createElement;
Expand Down
4 changes: 3 additions & 1 deletion test/assertComponents.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ import { TestComp, TestComp2 } from "./testComponents.mjs";

import { strict as assert } from "node:assert";
const { describe, it } = await (async () => {
// @ts-ignore
const module = process.isBun ? "bun:test" : "node:test";
// @ts-ignore
return process.isBun // @ts-ignore
? Promise.resolve({ describe: (_, fn) => fn(), it: test })
: import("node:test");
: import(module);
})();

const h = React.createElement;
Expand Down
4 changes: 3 additions & 1 deletion test/mockComponent.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ import { mockComponent } from "../index.mjs";
import { TestComp } from "./testComponents.mjs";

const { describe, it } = await (async () => {
// @ts-ignore
const module = process.isBun ? "bun:test" : "node:test";
// @ts-ignore
return process.isBun // @ts-ignore
? Promise.resolve({ describe: (_, fn) => fn(), it: test })
: import("node:test");
: import(module);
})();

const h = React.createElement;
Expand Down
4 changes: 3 additions & 1 deletion test/testRenderer.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ import { TestComp, TestComp2 } from "./testComponents.mjs";

import { strict as assert } from "node:assert";
const { describe, it } = await (async () => {
// @ts-ignore
const module = process.isBun ? "bun:test" : "node:test";
// @ts-ignore
return process.isBun // @ts-ignore
? Promise.resolve({ describe: (_, fn) => fn(), it: test })
: import("node:test");
: import(module);
})();

const h = React.createElement;
Expand Down

0 comments on commit 636b429

Please sign in to comment.