Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Fixed test reporter #2751

Merged
merged 1 commit into from
Nov 18, 2024
Merged

chore: Fixed test reporter #2751

merged 1 commit into from
Nov 18, 2024

Conversation

jsumners-nr
Copy link
Contributor

#2700 tried to improve our test reporter by keeping track of individual subtest failures. But it was not a success. A test suite like the one below would report as passing even though it should have been reported as failing:

'use strict'

const test = require('node:test')
const assert = require('node:assert')

test('passing', () => assert.ok(true))

test('failing', () => { throw Error('boom') })

test('passing2', () => assert.ok(true))

This refactor solves the problem (🤞).

@jsumners-nr jsumners-nr added the dev:tests Indicates only changes to tests label Nov 18, 2024
@jsumners-nr jsumners-nr marked this pull request as ready for review November 18, 2024 19:48
Copy link

codecov bot commented Nov 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.19%. Comparing base (40aea36) to head (ce3630c).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2751      +/-   ##
==========================================
- Coverage   97.25%   97.19%   -0.06%     
==========================================
  Files         294      294              
  Lines       46233    46233              
==========================================
- Hits        44965    44938      -27     
- Misses       1268     1295      +27     
Flag Coverage Δ
integration-tests-cjs-18.x 74.29% <ø> (+<0.01%) ⬆️
integration-tests-cjs-20.x 74.30% <ø> (ø)
integration-tests-cjs-22.x 74.33% <ø> (-0.01%) ⬇️
integration-tests-esm-18.x 49.92% <ø> (ø)
integration-tests-esm-20.x 49.93% <ø> (ø)
integration-tests-esm-22.x 49.95% <ø> (ø)
unit-tests-18.x 88.96% <ø> (ø)
unit-tests-20.x ?
unit-tests-22.x ?
versioned-tests-18.x 79.00% <ø> (-0.17%) ⬇️
versioned-tests-20.x 78.98% <ø> (-0.20%) ⬇️
versioned-tests-22.x 79.01% <ø> (-0.17%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@bizob2828 bizob2828 merged commit 5878ef9 into main Nov 18, 2024
54 of 55 checks passed
@bizob2828 bizob2828 deleted the fix-reporter branch November 18, 2024 19:53
@github-actions github-actions bot mentioned this pull request Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev:tests Indicates only changes to tests
Projects
Status: Done: Issues recently completed
Development

Successfully merging this pull request may close these issues.

3 participants