Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

chore: test infra for transformations #4719

Merged
merged 4 commits into from
Jul 23, 2023
Merged

chore: test infra for transformations #4719

merged 4 commits into from
Jul 23, 2023

Conversation

ematipico
Copy link
Contributor

Summary

I moved all the shared functions across the analyzers inside a rome_test_utils crate.

The test infra of the transformer is a bit different from the analyzer:

  • inside the transformations, we don't have about trivia, so all code is one lined;
  • in the test infra, the code that is dumped in the snapshot is formatted;

We could evaluate to format of the emitted code once we expose the feature in the userland.

Test Plan

Fixed the enum transformation in some cases, but still cases need to be handled, and I plan to do so in another PR.

@ematipico ematipico requested a review from Conaclos July 21, 2023 11:23
@netlify
Copy link

netlify bot commented Jul 21, 2023

Deploy Preview for docs-rometools ready!

Name Link
🔨 Latest commit de0bcb4
🔍 Latest deploy log https://app.netlify.com/sites/docs-rometools/deploys/64bd084ed54d94000805267f
😎 Deploy Preview https://deploy-preview-4719--docs-rometools.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@github-actions github-actions bot added A-Linter Area: linter A-Core Area: core L-JavaScript Langauge: JavaScript A-Parser Area: parser L-JSON Language: JSON labels Jul 21, 2023
@github-actions
Copy link

Parser conformance results on ubuntu-latest

js/262

Test result main count This PR count Difference
Total 48863 48863 0
Passed 47810 47810 0
Failed 1053 1053 0
Panics 0 0 0
Coverage 97.84% 97.84% 0.00%

jsx/babel

Test result main count This PR count Difference
Total 40 40 0
Passed 37 37 0
Failed 3 3 0
Panics 0 0 0
Coverage 92.50% 92.50% 0.00%

symbols/microsoft

Test result main count This PR count Difference
Total 6212 6212 0
Passed 1764 1764 0
Failed 4448 4448 0
Panics 0 0 0
Coverage 28.40% 28.40% 0.00%

ts/babel

Test result main count This PR count Difference
Total 639 639 0
Passed 573 573 0
Failed 66 66 0
Panics 0 0 0
Coverage 89.67% 89.67% 0.00%

ts/microsoft

Test result main count This PR count Difference
Total 17224 17224 0
Passed 13121 13121 0
Failed 4103 4103 0
Panics 0 0 0
Coverage 76.18% 76.18% 0.00%

Copy link
Contributor

@Conaclos Conaclos left a comment

Choose a reason for hiding this comment

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

Looks good to me!

crates/rome_js_syntax/src/file_source.rs Outdated Show resolved Hide resolved
@github-actions github-actions bot removed the A-Core Area: core label Jul 23, 2023
@ematipico ematipico merged commit 2727926 into main Jul 23, 2023
19 checks passed
@ematipico ematipico deleted the feat/test-utils branch July 23, 2023 15:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Linter Area: linter A-Parser Area: parser L-JavaScript Langauge: JavaScript L-JSON Language: JSON
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants