Title: tests: review and fix ineffective error tests · Issue #26385 · nodejs/node · GitHub
Open Graph Title: tests: review and fix ineffective error tests · Issue #26385 · nodejs/node
X Title: tests: review and fix ineffective error tests · Issue #26385 · nodejs/node
Description: See #26078 (review) for context. After that, I looked up if we already have similar ineffective tests in our codebase, and I think that I found at least one. E.g. using grep -r ' catch' test/ -A 2 | grep strictEqual, this one popped up h...
Open Graph Description: See #26078 (review) for context. After that, I looked up if we already have similar ineffective tests in our codebase, and I think that I found at least one. E.g. using grep -r ' catch' test/ -A 2 ...
X Description: See #26078 (review) for context. After that, I looked up if we already have similar ineffective tests in our codebase, and I think that I found at least one. E.g. using grep -r ' catch' tes...
Opengraph URL: https://github.com/nodejs/node/issues/26385
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"tests: review and fix ineffective error tests","articleBody":"See https://github.com/nodejs/node/pull/26078#pullrequestreview-209542148 for context.\r\n\r\nAfter that, I looked up if we already have similar ineffective tests in our codebase, and I think that I found at least one.\r\n\r\nE.g. using `grep -r ' catch' test/ -A 2 | grep strictEqual`, this one popped up half through the list: \r\n\r\nhttps://github.com/nodejs/node/blob/453ed053432e0c1ae34457e5c364b7091af2615e/test/parallel/test-stream-readable-async-iterators.js#L355-L361\r\n\r\nThe code above doesn't test that the error is thrown (as it likely should), instead it tests that _another_ error _doesn't_ get thrown.\r\n\r\nNote that there are a lot of false positives in the said grep (actually most matches are false positives), because e.g. this is perfectly fine:\r\nhttps://github.com/nodejs/node/blob/453ed053432e0c1ae34457e5c364b7091af2615e/test/parallel/test-vm-module-errors.js#L266-L272","author":{"url":"https://github.com/ChALkeR","@type":"Person","name":"ChALkeR"},"datePublished":"2019-03-01T23:48:39.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":7},"url":"https://github.com/26385/node/issues/26385"}
| 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:7dfb1164-22e2-3abf-eb61-ee4e14634f86 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DC86:316DD0:42EC0E:606ED6:6A4E06B9 |
| html-safe-nonce | 4e7846960863596317aa07c1540afd12b81315bc652d64d90abe6f96af247329 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQzg2OjMxNkREMDo0MkVDMEU6NjA2RUQ2OjZBNEUwNkI5IiwidmlzaXRvcl9pZCI6IjQwMjg5MTA1MTkyMjYwNzQ4MDkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 29840d04eaf3b98902b6089a79390039bc62668efae74e6c6dcc1b3e9184ee29 |
| hovercard-subject-tag | issue:416323630 |
| 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/26385/issue_layout |
| twitter:image | https://opengraph.githubassets.com/921fb8d5d4fd5ce7204aead78dab84a0eca293b9ee493bab8419709597c38366/nodejs/node/issues/26385 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/921fb8d5d4fd5ce7204aead78dab84a0eca293b9ee493bab8419709597c38366/nodejs/node/issues/26385 |
| og:image:alt | See #26078 (review) for context. After that, I looked up if we already have similar ineffective tests in our codebase, and I think that I found at least one. E.g. using grep -r ' catch' test/ -A 2 ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ChALkeR |
| hostname | github.com |
| expected-hostname | github.com |
| None | df0492960db29b4938cb72070351d6b1d0c6c0767b27ceb8394bbf4fcc0223c6 |
| 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 | 52bde38e24398476f8eb1e0760c81346c6a00812 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width