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

switch from jest to uvu #6915

Merged
merged 9 commits into from
Nov 29, 2021
Merged

Conversation

sachinraja
Copy link
Contributor

@sachinraja sachinraja commented Nov 25, 2021

uvu is faster and way smaller than jest and its dependencies (~1 MB vs ~40 MB).

jest:

Benchmark 1: npm t
  Time (mean ± σ):     10.590 s ±  0.856 s    [User: 23.097 s, System: 2.174 s]
  Range (min … max):    9.548 s … 12.687 s    10 runs

uvu:

Benchmark 1: npm t
  Time (mean ± σ):      4.682 s ±  0.277 s    [User: 4.573 s, System: 0.957 s]
  Range (min … max):    4.348 s …  5.138 s    10 runs

uvu is much faster than jest. This also improves GH Actions/CI times.

@sachinraja sachinraja added the package Pull requests or issues that affect the NPM package label Nov 25, 2021
@LitoMore
Copy link
Member

How about AVA?

@sachinraja
Copy link
Contributor Author

sachinraja commented Nov 26, 2021

ava:

Benchmark 1: npm t
  Time (mean ± σ):      8.252 s ±  0.095 s    [User: 17.197 s, System: 1.695 s]
  Range (min … max):    8.098 s …  8.373 s    10 runs

While I like ava's output format much better, uvu is still considerably faster.

@mondeja mondeja self-requested a review November 28, 2021 20:28
Copy link
Member

@mondeja mondeja left a comment

Choose a reason for hiding this comment

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

Really awesome! 🎉

I have taken the liberty of committing to delete jest-diff dependency. Check it and if you see all ok, feel free to merge @sachinraja

@sachinraja
Copy link
Contributor Author

sachinraja commented Nov 28, 2021

I have taken the liberty of committing to delete jest-diff dependency.

I also looked into replacing jest-diff but not limiting the output only to the surrounding lines makes it useless. It shows the entire diff between both strings, sometimes completely hiding the diff.

We could try using https://www.npmjs.com/package/fake-diff instead.

@mondeja
Copy link
Member

mondeja commented Nov 29, 2021

Yes, it looks better!

@mondeja mondeja self-requested a review November 29, 2021 00:46
Copy link
Member

@mondeja mondeja left a comment

Choose a reason for hiding this comment

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

Great! Thank you @sachinraja

@mondeja mondeja merged commit a14e03c into simple-icons:develop Nov 29, 2021
@mondeja mondeja added dependencies Pull requests that update a dependency file meta Issues or pull requests regarding the project or repository itself and removed package Pull requests or issues that affect the NPM package labels Nov 29, 2021
@sachinraja sachinraja deleted the faster-tests branch November 29, 2021 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file meta Issues or pull requests regarding the project or repository itself
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants