You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importassertfrom"node:assert/strict";import{describe,it}from"node:test";declare global {constfoo: string;}describe("foo",()=>{it("bar",()=>{assert.strictEqual(1,1);});});
$ pnpm run test
> lib@ test /Users/oliver/Code/reduced-test-cases/datadog-test-node
> NODE_OPTIONS="--require dd-trace/ci/init --import dd-trace/register.js" node --experimental-strip-types --test(node:81233) Error: 'import-in-the-middle' failed to wrap 'file:///Users/oliver/Code/reduced-test-cases/datadog-test-node/foo.test.ts'(Use `node --trace-warnings ...` to show where the warning was created)file:///Users/oliver/Code/reduced-test-cases/datadog-test-node/foo.test.ts?iitm=true:4declare global { ^^^^^^SyntaxError: Unexpected identifier 'global' at compileSourceTextModule (node:internal/modules/esm/utils:338:16) at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:102:18) at #translate (node:internal/modules/esm/loader:468:12) at ModuleLoader.loadAndTranslate (node:internal/modules/esm/loader:515:27) at async ModuleJob._link (node:internal/modules/esm/module_job:115:19)Node.js v22.14.0✖ foo.test.ts (209.429292ms)ℹ tests 1ℹ suites 0ℹ pass 0ℹ fail 1ℹ cancelled 0ℹ skipped 0ℹ todo 0ℹ duration_ms 216.805792✖ failing tests:test at foo.test.ts:1:1✖ foo.test.ts (209.429292ms) 'test failed' ELIFECYCLE Test failed. See above for more details.
Is your feature request related to a problem?
No response
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered:
hey @OliverJAsh ! Thanks for the request. We've been meaning to add support for node:test for a bit (it's indeed not supported), but haven't had the bandwidth to do it 😄. Your request is useful, as we can use it to add weight to the decision
Package Name
No response
Package Version(s)
No response
Describe the feature you'd like
I am using Node's built-in test runner and I would like to use it with Datadog's Test Visibility feature.
The documentation doesn't seem to mention that this is supported. When I tried it I got an error. Reduced test case here. Contents inlined below:
package.json
:foo.test.ts
:Is your feature request related to a problem?
No response
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: