Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add job to run tests in bun #2553

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading