Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

refactor: move tests to specificly related folders #531

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

Merged
mpeyper merged 4 commits into beta from refactor/tests-proposal
Jan 10, 2021

Conversation

Copy link
Member

@joshuaellis joshuaellis commented Jan 9, 2021

What:

Proposal to move test files to be closer to the code that we're testing, and rename those test files to be *.test.ts(x).

Why:

This was discussed in #510, I'd say the main issue is they're all named the same and incredibly close together, now we're maintaining "three engines" we may mind that the testing needs to diverge, an example is seen in src/server where we need to test the hydration warnings. It also, imo, makes the repo look tidier.

Renaming the tests was a personal choice, if i'm jumping around a lot of files, it's really helpful to understand whats a test file just from the name. Added bonus, you normally get a different icon in your IDE.

Also we do want to try and figure out how to cover src/pure.ts so this wouldn't actually fit into the old test folder pattern because they were related to the renderer. Therefore when we cross that bridge I would suggest putting the test in src/__tests__ and thus naming it pure.test.ts.

Checklist:

  • Tests
  • Ready to be merged

Copy link
Member Author

hm. probably need to move that tsconfig.json out of src/__tests__ and just into test.... that's annoying.

Copy link
Member

@mpeyper mpeyper left a comment

Choose a reason for hiding this comment

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

A few suggestions, but no showstoppers

Copy link
Member

mpeyper commented Jan 9, 2021
edited
Loading

You have forgotten to update the eslintrc file which is why the CI is failing.

Copy link
Member

mpeyper commented Jan 9, 2021

hm. probably need to move that tsconfig.json out of src/__tests__ and just into test.... that's annoying.

If my other comments are right, you can just delete it

@mpeyper mpeyper force-pushed the refactor/tests-proposal branch from 9c3d9b1 to a86fd96 Compare January 10, 2021 10:00
Copy link

codecov bot commented Jan 10, 2021
edited
Loading

Codecov Report

Merging #531 (2957443) into beta (ca32bce) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@ Coverage Diff @@
## beta #531 +/- ##
=========================================
 Coverage 100.00% 100.00% 
=========================================
 Files 12 12 
 Lines 189 189 
 Branches 27 27 
=========================================
 Hits 189 189 

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ca32bce...2957443. Read the comment docs.

@mpeyper mpeyper merged commit 43891e1 into beta Jan 10, 2021
@mpeyper mpeyper deleted the refactor/tests-proposal branch January 10, 2021 10:18
Copy link
Member Author

Thanks for doing those updates.

mpeyper reacted with thumbs up emoji

Copy link

🎉 This PR is included in version 5.0.0-beta.8 🎉

The release is available on:

Your semantic-release bot 📦🚀

Copy link

🎉 This PR is included in version 5.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@mpeyper mpeyper mpeyper approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /