Title: Test runner location output not source-mapped · Issue #51392 · nodejs/node · GitHub
Open Graph Title: Test runner location output not source-mapped · Issue #51392 · nodejs/node
X Title: Test runner location output not source-mapped · Issue #51392 · nodejs/node
Description: Version v21.3.0 Platform Darwin wavel.local 23.2.0 Darwin Kernel Version 23.2.0: Wed Nov 15 21:53:34 PST 2023; root:xnu-10002.61.3~2/RELEASE_ARM64_T8103 arm64 Subsystem node:test What steps will reproduce the bug? I have checked in a sim...
Open Graph Description: Version v21.3.0 Platform Darwin wavel.local 23.2.0 Darwin Kernel Version 23.2.0: Wed Nov 15 21:53:34 PST 2023; root:xnu-10002.61.3~2/RELEASE_ARM64_T8103 arm64 Subsystem node:test What steps will re...
X Description: Version v21.3.0 Platform Darwin wavel.local 23.2.0 Darwin Kernel Version 23.2.0: Wed Nov 15 21:53:34 PST 2023; root:xnu-10002.61.3~2/RELEASE_ARM64_T8103 arm64 Subsystem node:test What steps will re...
Opengraph URL: https://github.com/nodejs/node/issues/51392
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Test runner location output not source-mapped","articleBody":"### Version\n\nv21.3.0\n\n### Platform\n\nDarwin wavel.local 23.2.0 Darwin Kernel Version 23.2.0: Wed Nov 15 21:53:34 PST 2023; root:xnu-10002.61.3~2/RELEASE_ARM64_T8103 arm64\n\n### Subsystem\n\nnode:test\n\n### What steps will reproduce the bug?\n\nI have checked in a simple example at\r\nhttps://github.com/malthe/node/tree/source-map-test-issue.\r\n\r\nClone the repo and run the following commands.\r\n```bash\r\n$ npm i -D ts-node\r\n$ node --loader ts-node/esm --enable-source-maps test.mts\r\n```\n\n### How often does it reproduce? Is there a required condition?\n\n_No response_\n\n### What is the expected behavior? Why is that the expected behavior?\n\nIn the first line in the output, starting with \"test at\", notice that the location is being reported as \"3:1\".\r\n\r\nBut there is nothing on this line, it's empty. It should be \"4:1\". The \"test at\" location is not mapped, even though `--enable-source-maps` is given.\r\n\r\nIn the stack trace provided for the assertion failure, locations are _correct_ (mapped).\r\n\r\nNote that if this option is not used at all, then both locations are wrong (i.e., unmapped).\n\n### What do you see instead?\n\n```\r\n...\r\n✖ failing tests:\r\n\r\ntest at file:/.../test.mts:3:1\r\n✖ hello (1.201292ms)\r\n AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:\r\n \r\n 1 !== 2\r\n \r\n at TestContext.\u003canonymous> (file:///.../test.mts:5:10)\r\n at Test.runInAsyncScope (node:async_hooks:206:9)\r\n at Test.run (node:internal/test_runner/test:631:25)\r\n at Test.start (node:internal/test_runner/test:542:17)\r\n at startSubtest (node:internal/test_runner/harness:216:17) {\r\n generatedMessage: true,\r\n code: 'ERR_ASSERTION',\r\n actual: 1,\r\n expected: 2,\r\n operator: 'strictEqual'\r\n }\r\n```\n\n### Additional information\n\n_No response_","author":{"url":"https://github.com/malthe","@type":"Person","name":"malthe"},"datePublished":"2024-01-06T11:54:46Z","url":"https://github.com/nodejs/node/issues/51392"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:352a40b3-8d15-4968-9461-98403bb21dd1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B914:AC3D5:2FE3527:3F59C50:6B035427 |
| html-safe-nonce | 4f1d9a805f640c3583af0a6fbf1a5cf5611cc5865a5408b27f076fa1d36a3f43 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCOTE0OkFDM0Q1OjJGRTM1Mjc6M0Y1OUM1MDo2QjAzNTQyNyIsInZpc2l0b3JfaWQiOiIyMTUwODM2Mzg3MTY1OTgzNzgzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | f7a98a7fd67e01851aa02b6ee30b9890aa95559337733b473aeaa0e3fdb9623b |
| hovercard-subject-tag | issue:2068570502 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/51392/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d3b5d872b6b8770cfb72ef78db1b39398adda68aae54e99103dc69b066998e0c/nodejs/node/issues/51392 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d3b5d872b6b8770cfb72ef78db1b39398adda68aae54e99103dc69b066998e0c/nodejs/node/issues/51392 |
| og:image:alt | Version v21.3.0 Platform Darwin wavel.local 23.2.0 Darwin Kernel Version 23.2.0: Wed Nov 15 21:53:34 PST 2023; root:xnu-10002.61.3~2/RELEASE_ARM64_T8103 arm64 Subsystem node:test What steps will re... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | malthe |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width