Title: [node:test] test.only does not work without it being wrapped in describe.only · Issue #51882 · nodejs/node · GitHub
Open Graph Title: [node:test] test.only does not work without it being wrapped in describe.only · Issue #51882 · nodejs/node
X Title: [node:test] test.only does not work without it being wrapped in describe.only · Issue #51882 · nodejs/node
Description: Version 20 Platform Mac Subsystem No response What steps will reproduce the bug? // file: example.test.js const {test, describe} = require('node:test'); describe('something', () => { test.only('example', async () => { // some async test ...
Open Graph Description: Version 20 Platform Mac Subsystem No response What steps will reproduce the bug? // file: example.test.js const {test, describe} = require('node:test'); describe('something', () => { test.only('exa...
X Description: Version 20 Platform Mac Subsystem No response What steps will reproduce the bug? // file: example.test.js const {test, describe} = require('node:test'); describe('something', () =&g...
Opengraph URL: https://github.com/nodejs/node/issues/51882
X: @github
Domain: github.com
IPv4 address: 140.82.113.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[node:test] test.only does not work without it being wrapped in describe.only","articleBody":"### Version\n\n20\n\n### Platform\n\nMac\n\n### Subsystem\n\n_No response_\n\n### What steps will reproduce the bug?\n\n```\r\n// file: example.test.js\r\nconst {test, describe} = require('node:test');\r\n\r\ndescribe('something', () => {\r\n test.only('example', async () => {\r\n // some async test\r\n });\r\n});\r\n```\r\n\r\n```\r\nnode --test --test-only\r\n```\r\n\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\nI would expect Node test runner to be smart to pick up the `test.only` without expecting me to mark the wrapper `describe` block with `only` also. There are cases that tests are a few `describe` blocks deep. It is really uncomfortable to update all of the parents with `only`\n\n### What do you see instead?\n\nI get\r\n\r\n```\r\n﹣ something (0.351ms) # 'only' option not set\r\n```\n\n### Additional information\n\n_No response_","author":{"url":"https://github.com/mohsen1","@type":"Person","name":"mohsen1"},"datePublished":"2024-02-26T12:07:37Z","url":"https://github.com/nodejs/node/issues/51882"}
| 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:faf1b53e-2750-4e05-5c18-2471d9ee3945 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BE92:FDE63:1FD688C:2A04E03:6B034FCC |
| html-safe-nonce | b36f435bdd9194a2f3ec4a1e9f6bb87cdbd6efef2c6db898e0d408fea0473c73 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRTkyOkZERTYzOjFGRDY4OEM6MkEwNEUwMzo2QjAzNEZDQyIsInZpc2l0b3JfaWQiOiI2MDQ5ODg4OTYzNTUwOTkwMjg0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | fb31b7e47c6a1b16b7ed2185e6f54fc4adc7f2f230f05490a4ac7c3a2a1a60d5 |
| hovercard-subject-tag | issue:2154021625 |
| 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/51882/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9d658781c9eb038b5a162631d338d0089bcf992d852095919fd01aa2df4903e6/nodejs/node/issues/51882 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9d658781c9eb038b5a162631d338d0089bcf992d852095919fd01aa2df4903e6/nodejs/node/issues/51882 |
| og:image:alt | Version 20 Platform Mac Subsystem No response What steps will reproduce the bug? // file: example.test.js const {test, describe} = require('node:test'); describe('something', () => { test.only('exa... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mohsen1 |
| 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