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

test: improve test coverage; multiple internal refactors #6912

Merged
merged 1 commit into from
Mar 14, 2022

Conversation

Josh-Cena
Copy link
Collaborator

Motivation

In order to improve the test coverage, I had to make a lot of refactors😟

  • Some code branches that are overly defensive and can never been reached have been removed
  • theme-translations/update.mjs is now ESM. I've managed to split the extractThemeCodeMessages util that the Jest test uses into a separate file, so that we get the best of both worlds
  • Some core functions are extracted into utils, so that core/commands is now fully untested except for swizzle. We would add E2E tests later, once we have a separate org where I plan to host E2E fixture repos.
  • I've managed to reliably remove the quotes of some route module properties, so that we no longer add quotes all the time.

Have you read the Contributing Guidelines on pull requests?

Yes

@Josh-Cena Josh-Cena added the pr: maintenance This PR does not produce any behavior differences to end users when upgrading. label Mar 14, 2022
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Mar 14, 2022
@netlify
Copy link

netlify bot commented Mar 14, 2022

✔️ [V2]

🔨 Explore the source changes: 1714a33

🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/622f42299dc1570009f8f84c

😎 Browse the preview: https://deploy-preview-6912--docusaurus-2.netlify.app

@github-actions
Copy link

⚡️ Lighthouse report for the changes in this PR:

Category Score
🟠 Performance 69
🟢 Accessibility 100
🟢 Best practices 92
🟢 SEO 100
🟢 PWA 90

Lighthouse ran on https://deploy-preview-6912--docusaurus-2.netlify.app/

@github-actions
Copy link

Size Change: 0 B

Total Size: 792 kB

ℹ️ View Unchanged
Filename Size
website/.docusaurus/globalData.json 49.9 kB
website/build/assets/css/styles.********.css 105 kB
website/build/assets/js/main.********.js 599 kB
website/build/index.html 38.7 kB

compressed-size-action

@Josh-Cena Josh-Cena merged commit ad88f5c into main Mar 14, 2022
@Josh-Cena Josh-Cena deleted the jc/improve-test branch March 14, 2022 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: maintenance This PR does not produce any behavior differences to end users when upgrading.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants