Skip to content

Commit

Permalink
Add job to run tests in bun
Browse files Browse the repository at this point in the history
  • Loading branch information
mroderick committed Oct 10, 2023
1 parent 737736f commit 2a69a51
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -168,3 +168,12 @@ jobs:
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: 1
- name: npm test
run: npm run test-node

test-bun:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
- run: |
bun install
bun run test-bun
Binary file added bun.lockb
Binary file not shown.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"license": "BSD-3-Clause",
"scripts": {
"test-node": "mocha --recursive -R dot \"test/**/*-test.js\"",
"test-bun": "bun run ./node_modules/mocha/bin/mocha --recursive -R dot \"test/**/*-test.js\"",
"test-dev": "npm run test-node -- --watch -R min",
"test-headless": "mochify --no-detect-globals --recursive -R dot --grep WebWorker --invert --plugin [ proxyquire-universal ] \"test/**/*-test.js\"",
"test-coverage": "nyc npm run test-headless -- --transform [ babelify --ignore [ test ] --plugins [ babel-plugin-istanbul ] ]",
Expand Down
5 changes: 5 additions & 0 deletions test/sinon-test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
"use strict";

// proxyquire doesn't work with bun, so for now, let's skip this file
if (process.versions.bun) {
return;
}

const assert = require("@sinonjs/referee").assert;
const functionName = require("@sinonjs/commons").functionName;
const Sandbox = require("../lib/sinon/sandbox");
Expand Down
5 changes: 5 additions & 0 deletions test/util/core/color-test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
"use strict";

// proxyquire doesn't work with bun, so for now, let's skip this file
if (process.versions.bun) {
return;
}

const assert = require("@sinonjs/referee").assert;
const proxyquire = require("proxyquire");

Expand Down

0 comments on commit 2a69a51

Please sign in to comment.