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

Running tests using Bun fails #1150

Open
5 tasks done
kelvinkipruto opened this issue Nov 8, 2024 · 0 comments
Open
5 tasks done

Running tests using Bun fails #1150

kelvinkipruto opened this issue Nov 8, 2024 · 0 comments
Labels
pending-triage Someone (usually a maintainer) needs to look into this to see if it's a bug

Comments

@kelvinkipruto
Copy link

Describe the bug

When running tests using bun, they fail with the following error:

if (!(globalThis.chrome && globalThis.chrome.runtime && globalThis.chrome.runtime.id)) {
 throw new Error("This script should only be loaded in a browser extension.");
error: This script should only be loaded in a browser extension.

However when using any other package manager like pnpm, the tests pass

Reproduction

bun-test.zip

Steps to reproduce

Run bun install then bun test

System Info

System:
    OS: macOS 15.0.1
    CPU: (11) arm64 Apple M3 Pro
    Memory: 68.67 MB / 18.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.17.0 - /etc/profiles/per-user/kelvinkipruto/bin/node
    npm: 10.8.2 - /etc/profiles/per-user/kelvinkipruto/bin/npm
    pnpm: 9.10.0 - /etc/profiles/per-user/kelvinkipruto/bin/pnpm
    bun: 1.1.29 - /etc/profiles/per-user/kelvinkipruto/bin/bun
  Browsers:
    Chrome: 130.0.6723.117
    Safari: 18.0.1
  npmPackages:
    wxt: ^0.19.13 => 0.19.13

Used Package Manager

bun

Validations

@kelvinkipruto kelvinkipruto added the pending-triage Someone (usually a maintainer) needs to look into this to see if it's a bug label Nov 8, 2024
@kelvinkipruto kelvinkipruto changed the title Running Test using Bun fails Running tests using Bun fails Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending-triage Someone (usually a maintainer) needs to look into this to see if it's a bug
Projects
None yet
Development

No branches or pull requests

1 participant