nodejs / node-core-test

Node 18's node:test, as an npm package

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

3.2.0 fails in node 14

juliangruber opened this issue · comments

See eg juliangruber/parse-apache-directory-index#28

/Users/julian/dev/juliangruber/parse-apache-directory-index/node_modules/test/lib/internal/abort_controller.js:4
  AbortController,
  ^

ReferenceError: AbortController is not defined
    at Object.<anonymous> (/Users/julian/dev/juliangruber/parse-apache-directory-index/node_modules/test/lib/internal/abort_controller.js:4:3)

I wonder why tests didn't catch this. Is it because we pass our own AbortController implementation?

There's catch in the README:

- Requires `--experimental-abortcontroller` CLI flag to work on Node.js v14.x.

And here's how we're testing it:

matrix:
node: ['14', '16', '18']
include:
- node: '14'
env: --experimental-abortcontroller --no-warnings
- run: npm test
env:
NODE_OPTIONS: ${{ matrix.env }}

Aah right I forgot about that. Thank you for pointing this out. I think this should have been a major version bump then.

shall we deprecate 3.2.0 and publish 4.0.0?