Skip to content

Bug: @std/internal unexpected globalThis.* usage for node.js #6652

Open
@jerome-benoit

Description

@jerome-benoit

Describe the bug

https://github.com/poolifier/poolifier/actions/runs/15019258415/job/42204316093:

 1) Uncaught error outside test suite:
     Uncaught TypeError: globalThis.addEventListener is not a function
      at new AssertionState (/home/runner/work/poolifier/poolifier/node_modules/.pnpm/@[email protected]/node_modules/@jsr/std__internal/assertion_state.ts:33:16)
      at <anonymous> (/home/runner/work/poolifier/poolifier/node_modules/.pnpm/@[email protected]/node_modules/@jsr/std__internal/assertion_state.ts:212:24)
      at ModuleJob.run (node:internal/modules/esm/module_job:263:25)
      at async ModuleLoader.import (node:internal/modules/esm/loader:540:24)
      at async formattedImport (/home/runner/work/poolifier/poolifier/node_modules/.pnpm/[email protected]/node_modules/mocha/lib/nodejs/esm-utils.js:9:14)
      at async exports.loadFilesAsync (/home/runner/work/poolifier/poolifier/node_modules/.pnpm/[email protected]/node_modules/mocha/lib/nodejs/esm-utils.js:100:20)
      at async AsyncFunction.run (/home/runner/work/poolifier/poolifier/node_modules/.pnpm/[email protected]/node_modules/mocha/lib/nodejs/worker.js:107:5)

Or https://github.com/SAP/e-mobility-charging-stations-simulator/actions/runs/15022866262/job/42216243165

Steps to Reproduce

Use latest @std/expect with node.js, any supported versions

Expected behavior

Should work with node.js as the previous version

Environment

  • node version: all LTS
  • @std/internal version: 1.0.7

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions