Title: test_runner: only not working properly in subtests · Issue #49015 · nodejs/node · GitHub
Open Graph Title: test_runner: only not working properly in subtests · Issue #49015 · nodejs/node
X Title: test_runner: only not working properly in subtests · Issue #49015 · nodejs/node
Description: It seems there is some odd behavior with only and subtests, because I expected the following to pass: const test = require('node:test') test('this should be run', { only: true }, (t) => { t.test('this should be run', { only: true }, (t) ...
Open Graph Description: It seems there is some odd behavior with only and subtests, because I expected the following to pass: const test = require('node:test') test('this should be run', { only: true }, (t) => { t.test('t...
X Description: It seems there is some odd behavior with only and subtests, because I expected the following to pass: const test = require('node:test') test('this should be run', { only: true }, (t...
Opengraph URL: https://github.com/nodejs/node/issues/49015
X: @github
Domain: github.com
IPv4 address: 140.82.113.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"test_runner: only not working properly in subtests","articleBody":"It seems there is some odd behavior with `only` and subtests, because I expected the following to pass:\r\n\r\n```js\r\nconst test = require('node:test')\r\n\r\ntest('this should be run', { only: true }, (t) => {\r\n t.test('this should be run', { only: true }, (t) => {\r\n })\r\n\r\n t.test('this should not be run', (t) => {\r\n })\r\n})\r\n```\r\n\r\nBut it's failing with an odd error\r\n\r\n```\r\n▶ this should be run\r\n ✔ this should be run (0.320833ms)\r\n ✖ this should not be run (0.216167ms)\r\n 'test did not finish before its parent and was cancelled'\r\n\r\n▶ this should be run (1.850417ms)\r\n\r\nℹ tests 3\r\nℹ suites 0\r\nℹ pass 1\r\nℹ fail 1\r\nℹ cancelled 1\r\nℹ skipped 0\r\nℹ todo 0\r\nℹ duration_ms 0.11275\r\n\r\n✖ failing tests:\r\n\r\n✖ this should not be run (0.216167ms)\r\n 'test did not finish before its parent and was cancelled'\r\n```","author":{"url":"https://github.com/mcollina","@type":"Person","name":"mcollina"},"datePublished":"2023-08-04T09:58:00Z","url":"https://github.com/nodejs/node/issues/49015"}
| 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:c5f1959e-754f-32d7-746f-44fbac19cc10 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9A12:17C2FE:1EB7C2C:28A2B74:6B034815 |
| html-safe-nonce | 0d439b76d350f3b9c7d13f7bf6833a0105c11401b8b482a4810ef758cae86b4d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QTEyOjE3QzJGRToxRUI3QzJDOjI4QTJCNzQ6NkIwMzQ4MTUiLCJ2aXNpdG9yX2lkIjoiNzgyMjY1MzQ3ODIzMjM0NDU5NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 551fb4dc660a2d683024ff13496a81b2e540a56c7c2c9cc1a24f2e719ed54130 |
| hovercard-subject-tag | issue:1836440244 |
| 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/49015/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1ad89bf915633d7211eb52d2e8496f068f862f03d12a5fe29dd110bc2ad7430e/nodejs/node/issues/49015 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1ad89bf915633d7211eb52d2e8496f068f862f03d12a5fe29dd110bc2ad7430e/nodejs/node/issues/49015 |
| og:image:alt | It seems there is some odd behavior with only and subtests, because I expected the following to pass: const test = require('node:test') test('this should be run', { only: true }, (t) => { t.test('t... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mcollina |
| 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