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: Remove jest dependencies #10301

Merged
merged 4 commits into from
Oct 20, 2024

Conversation

filzrev
Copy link
Contributor

@filzrev filzrev commented Oct 19, 2024

This PR remove jest related package dependencies.
And migrate tests to run with Node.js build-in Test Runner.

This changes is needed to update TypeScript module versions. (#10229)

What's changed in this PR

  • Remove jest related settings.
  • Modify helper.test.ts tests
  • Add tsx package that is used to execute tests that written with TypeScript.
  • Modify test command to node --import tsx --test modern/src/*.test.ts"
  • Update package-lock.json file
    • lockfileVersion is updated to 3.
      (It's updated when running npm install command on environment on Node v20.18.0 and npm 10.4.0)

@filzrev
Copy link
Contributor Author

filzrev commented Oct 19, 2024

Add following commits to resolve warning/errors.

1. chore: Run sass-migrator to fix scss warnings (53be532)

On npm run build steps. A lot of warnings are recorded.
And recommended to run sass-migrator command.

So I've run following steps.

  1. Run npm install -g sass-migrator command
  2. Run sass-migrator --migrate-deps --load-path="../../node_modules" module docfx.scss command
  3. Modify code styles

2. chore: suppress stylelint error (49827a5)

When running npm run line step. stylelint report errors.
that indicate following lines are redundant.
https://github.com/dotnet/docfx/blob/main/templates/modern/src/layout.scss#L193-L194

I can’t determine whether it is a correct or false positive.
So suppress error with comment.

3. chore: remove wild card that is not supported on windows with node20(49827a5)
On windows environment.
It seems wildcard is not supported when running on Node 20.
https://github.com/nodejs/node/issues/50658

So I've removed wildcard from file name.
Node 22 is expected to be LTS in the week of October 29th.
This commit will be reverted later.

@yufeih yufeih merged commit f06a6e9 into dotnet:main Oct 20, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants