Skip to content

Comments

test(linter): improve test failure output#6975

Merged
graphite-app[bot] merged 1 commit intomainfrom
10-27-test_linter_improve_test_failure_output
Oct 28, 2024
Merged

test(linter): improve test failure output#6975
graphite-app[bot] merged 1 commit intomainfrom
10-27-test_linter_improve_test_failure_output

Conversation

@camchenry
Copy link
Member

@camchenry camchenry commented Oct 28, 2024

Improves the test output when a test fails, based on the type of expectation. The output now includes the config that was passed, as well as the source code that failed. Additional formatting makes it a little bit easier to parse.

Before:

Screenshot 2024-10-27 at 11 54 02 PM

 

Screenshot 2024-10-27 at 11 54 56 PM

After:

Screenshot 2024-10-27 at 11 49 36 PM

 

Screenshot 2024-10-27 at 11 58 56 PM

@graphite-app
Copy link
Contributor

graphite-app bot commented Oct 28, 2024

Your org has enabled the Graphite merge queue for merging into main

Add the label “0-merge” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix.

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

Copy link
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @camchenry and the rest of your teammates on Graphite Graphite

@github-actions github-actions bot added A-linter Area - Linter C-test Category - Testing. Code is missing test cases, or a PR is adding them labels Oct 28, 2024
@camchenry camchenry requested a review from DonIsaac October 28, 2024 04:02
@camchenry camchenry marked this pull request as ready for review October 28, 2024 04:02
@codspeed-hq
Copy link

codspeed-hq bot commented Oct 28, 2024

CodSpeed Performance Report

Merging #6975 will not alter performance

Comparing 10-27-test_linter_improve_test_failure_output (c35d3f2) with main (fa9a4ec)

Summary

✅ 30 untouched benchmarks

Copy link
Member

@Boshen Boshen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@DonIsaac
Copy link
Contributor

Ship it 🚀

@DonIsaac DonIsaac added the 0-merge Merge with Graphite Merge Queue label Oct 28, 2024
Copy link
Contributor

DonIsaac commented Oct 28, 2024

Merge activity

  • Oct 28, 8:54 AM EDT: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Oct 28, 8:55 AM EDT: A user added this pull request to the Graphite merge queue.
  • Oct 28, 8:59 AM EDT: A user merged this pull request with the Graphite merge queue.

Improves the test output when a test fails, based on the type of expectation. The output now includes the config that was passed, as well as the source code that failed. Additional formatting makes it a little bit easier to parse.

Before:

<img width="818" alt="Screenshot 2024-10-27 at 11 54 02 PM" src="https://github.com/user-attachments/assets/bac4079c-566a-403b-adde-acdc709baceb">

&nbsp;

<img width="792" alt="Screenshot 2024-10-27 at 11 54 56 PM" src="https://github.com/user-attachments/assets/16074216-00ad-4cdc-9f47-09142242111d">

---

After:

<img width="784" alt="Screenshot 2024-10-27 at 11 49 36 PM" src="https://github.com/user-attachments/assets/5d687562-55f4-4e4f-aa3a-c90b90b714e8">

&nbsp;

<img width="820" alt="Screenshot 2024-10-27 at 11 58 56 PM" src="https://github.com/user-attachments/assets/0725d362-7aed-4fd0-9fab-93a7687aca6d">
@DonIsaac DonIsaac force-pushed the 10-27-test_linter_improve_test_failure_output branch from 1fb42a5 to c35d3f2 Compare October 28, 2024 12:55
@graphite-app graphite-app bot merged commit c35d3f2 into main Oct 28, 2024
@graphite-app graphite-app bot deleted the 10-27-test_linter_improve_test_failure_output branch October 28, 2024 12:59
@oxc-bot oxc-bot mentioned this pull request Nov 3, 2024
Boshen added a commit that referenced this pull request Nov 3, 2024
## [0.11.0] - 2024-11-03

- 9fd9f4f linter: [**BREAKING**] Sync sindresorhus/globals; removed
Object.prototype properties from builtin and es* globals (#6991)
(Boshen)

### Features

- 6b619da editor: Listen to config file changes and trigger a
didChangeConfiguration update (#6964) (Nicholas Rayburn)
- 7872927 editor/vscode: Support window/showMessage event (#7085)
(Nicholas Rayburn)
- 2184588 linter: Do not bail for unmatched rules yet (#7093) (Boshen)
- a6fcd81 linter: Add `import/no-commonjs` rule (#6978) (Dmitry
Zakharov)
- 1691cab linter: Support user-configurable secrets for
`oxc-security/api-keys` (#5938) (DonIsaac)
- 610621c linter: Implement `react/style-prop-object` (#6342) (Albert
Kaaman)
- 1e2f012 linter: Add `oxc/no-map-spread` (#6751) (DonIsaac)
- 1c66473 linter: Implement `eslint/prefer-object-has-own` (#6905)
(tomoya yanagibashi)

### Bug Fixes

- ebf3753 editor: Fix onConfigChange to send the correct config for
didChangeConfiguration notification (#6962) (Nicholas Rayburn)
- 79bf74a linter: Check is_reference_to_global_variable in
`no-array-constructor` (#7067) (Naoya Yoshizawa)
- 38d1f78 linter: Remove confusing help text for now (#7081) (Cam
McHenry)
- 147e2e4 linter: Allow replacing rule when none are enabled yet (#7014)
(camchenry)
- 7aa496a linter: Remove unsafe fixer of `no-useless-spread` (#6655)
(dalaoshu)
- f5a7134 linter/no-unused-vars: False positive for discarded reads
within sequences (#6907) (DonIsaac)

### Documentation

- 4551baa linter: Document `rules` (#6983) (Boshen)

### Refactor

- a8dc75d linter: Remove unused CLI result types (#7088) (camchenry)
- 8f1460e linter: Move `LintPlugins` from `LintOptions` to `LintConfig`
(#6932) (DonIsaac)

### Testing

- c35d3f2 linter: Improve test failure output (#6975) (camchenry)

---------

Co-authored-by: Boshen <[email protected]>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

0-merge Merge with Graphite Merge Queue A-linter Area - Linter C-test Category - Testing. Code is missing test cases, or a PR is adding them

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants