Title: Using QUnit.todo() causes build to fail instead of succeed · Issue #247 · browserstack/browserstack-runner · GitHub
Open Graph Title: Using QUnit.todo() causes build to fail instead of succeed · Issue #247 · browserstack/browserstack-runner
X Title: Using QUnit.todo() causes build to fail instead of succeed · Issue #247 · browserstack/browserstack-runner
Description: Expected Behavior Passing test. Actual Behavior [Windows 7, Firefox 45.0] Error: "my todo test" failed Expected: true Actual: false Details This is happening because when browserstack-runner is consuming the testEnd event from js-reporte...
Open Graph Description: Expected Behavior Passing test. Actual Behavior [Windows 7, Firefox 45.0] Error: "my todo test" failed Expected: true Actual: false Details This is happening because when browserstack-runner is con...
X Description: Expected Behavior Passing test. Actual Behavior [Windows 7, Firefox 45.0] Error: "my todo test" failed Expected: true Actual: false Details This is happening because when browserstack-run...
Opengraph URL: https://github.com/browserstack/browserstack-runner/issues/247
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Using QUnit.todo() causes build to fail instead of succeed","articleBody":"## Expected Behavior\r\nPassing test.\r\n\r\n## Actual Behavior\r\n```\r\n[Windows 7, Firefox 45.0] Error: \"my todo test\" failed\r\nExpected: true\r\n Actual: false\r\n```\r\n\r\n## Details\r\n\r\nThis is happening because when browserstack-runner is consuming the `testEnd` event from js-reporters, it is ignoring the `status` field. Instead of only priting formatted errors for `query.test.status === \"failed\"`, it is instead iterating over `query.test.errors` and always print each one as a formatted error, even if it is an expected error (such as the case with a \"todo\" test).\r\n\r\nHere is the test suite for the linked example in the browser visually (**passing**):\r\n\u003cimg height=\"300\" alt=\"capture\" src=\"https://user-images.githubusercontent.com/156867/120940256-41ac0d00-c714-11eb-9b15-97445078786f.png\"\u003e\r\n\r\n\r\nAnd here is what browserstack-runner report for that same build (**failing**):\r\n\r\nhttps://github.com/qunitjs/qunit/runs/2753071016\r\n```\r\n[OS X Big Sur, Safari 14.0] Error: \"test.todo.each [0]\" failed\r\nExpected: true\r\n Actual: false\r\n Source: runTest@http://localhost:8899/qunit/qunit.js:2262:41\r\n\t run@http://localhost:8899/qunit/qunit.js:2250:16\r\n\t http://localhost:8899/qunit/qunit.js:2472:19\r\n\t processTaskQueue@http://localhost:8899/qunit/qunit.js:1860:37\r\n\t http://localhost:8899/qunit/qunit.js:1864:29\r\n\t promiseReactionJob@[native code]\r\n```","author":{"url":"https://github.com/Krinkle","@type":"Person","name":"Krinkle"},"datePublished":"2021-06-06T21:13:04.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/247/browserstack-runner/issues/247"}
| 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:a529cbc8-37da-bd0f-651f-4d358812f1a7 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D3A8:31608E:648B103:8403E64:696DB66B |
| html-safe-nonce | d0cd5f39a55816fb6d45a88caa51b4d12350a072ffb93bdcd4d38b967ae53ac4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEM0E4OjMxNjA4RTo2NDhCMTAzOjg0MDNFNjQ6Njk2REI2NkIiLCJ2aXNpdG9yX2lkIjoiMTc2MDU2MDAxNDY5MTI1MTgxOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 3e5bd2bebb17752b76232657a2b6580fe099aa0f784bef766b63ae66ba2596f4 |
| hovercard-subject-tag | issue:912949718 |
| 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/browserstack/browserstack-runner/247/issue_layout |
| twitter:image | https://opengraph.githubassets.com/bb500ca49df7fb180b2604f59f7d5f9a61109cee682bca7a013cc3baca623f57/browserstack/browserstack-runner/issues/247 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/bb500ca49df7fb180b2604f59f7d5f9a61109cee682bca7a013cc3baca623f57/browserstack/browserstack-runner/issues/247 |
| og:image:alt | Expected Behavior Passing test. Actual Behavior [Windows 7, Firefox 45.0] Error: "my todo test" failed Expected: true Actual: false Details This is happening because when browserstack-runner is con... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Krinkle |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4922b452d03cd8dbce479d866a11bc25b59ef6ee2da23aa9b0ddefa6bd4d0064 |
| turbo-cache-control | no-preview |
| go-import | github.com/browserstack/browserstack-runner git https://github.com/browserstack/browserstack-runner.git |
| octolytics-dimension-user_id | 1119453 |
| octolytics-dimension-user_login | browserstack |
| octolytics-dimension-repository_id | 11685362 |
| octolytics-dimension-repository_nwo | browserstack/browserstack-runner |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 11685362 |
| octolytics-dimension-repository_network_root_nwo | browserstack/browserstack-runner |
| 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 | 7e5ae23c70136152637ceee8d6faceb35596ec46 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width