diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f8f8c2df7..37b747560 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 \ No newline at end of file diff --git a/bun.lockb b/bun.lockb new file mode 100755 index 000000000..94ed98340 Binary files /dev/null and b/bun.lockb differ diff --git a/package.json b/package.json index f97c4b073..95200bce6 100644 --- a/package.json +++ b/package.json @@ -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 ] ]", diff --git a/test/sinon-test.js b/test/sinon-test.js index 167b02bbb..6d5506b79 100644 --- a/test/sinon-test.js +++ b/test/sinon-test.js @@ -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"); diff --git a/test/util/core/color-test.js b/test/util/core/color-test.js index e99fcf991..6e920d92d 100644 --- a/test/util/core/color-test.js +++ b/test/util/core/color-test.js @@ -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");