Skip to content

test(utils): Switch to using vitest #12959

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

Closed
wants to merge 2 commits into from
Closed

Conversation

AbhiPrasad
Copy link
Member

@AbhiPrasad AbhiPrasad commented Jul 17, 2024

Before: Time: 4.86 s, estimated 7 s

After: Duration 1.92s (transform 2.05s, setup 1ms, collect 6.55s, tests 499ms, environment 762ms, prepare 3.65s)

ref #11084

Also:

  • removes array.prototype.flat polyfill which we no longer require because we support Node 14.18+
  • refactors a test in packages/utils/test/object.test.ts that was blocked by a jest bug

@AbhiPrasad AbhiPrasad requested a review from a team July 17, 2024 17:24
@AbhiPrasad AbhiPrasad self-assigned this Jul 17, 2024
@AbhiPrasad AbhiPrasad requested review from mydea and chargome and removed request for a team July 17, 2024 17:24
Copy link
Contributor

github-actions bot commented Jul 17, 2024

size-limit report 📦

Path Size
@sentry/browser 22.31 KB (+0.03% 🔺)
@sentry/browser (incl. Tracing) 33.73 KB (+0.02% 🔺)
@sentry/browser (incl. Tracing, Replay) 69.82 KB (+0.01% 🔺)
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 63.16 KB (+0.01% 🔺)
@sentry/browser (incl. Tracing, Replay with Canvas) 74.22 KB (+0.01% 🔺)
@sentry/browser (incl. Tracing, Replay, Feedback) 86.58 KB (+0.01% 🔺)
@sentry/browser (incl. Tracing, Replay, Feedback, metrics) 88.45 KB (+0.01% 🔺)
@sentry/browser (incl. metrics) 26.63 KB (+0.02% 🔺)
@sentry/browser (incl. Feedback) 39.03 KB (+0.02% 🔺)
@sentry/browser (incl. sendFeedback) 26.94 KB (+0.02% 🔺)
@sentry/browser (incl. FeedbackAsync) 31.58 KB (+0.02% 🔺)
@sentry/react 25.08 KB (-0.01% 🔽)
@sentry/react (incl. Tracing) 36.8 KB (+0.01% 🔺)
@sentry/vue 26.45 KB (+0.02% 🔺)
@sentry/vue (incl. Tracing) 35.62 KB (+0.02% 🔺)
@sentry/svelte 22.45 KB (+0.03% 🔺)
CDN Bundle 23.52 KB (-0.01% 🔽)
CDN Bundle (incl. Tracing) 35.51 KB (+0.01% 🔺)
CDN Bundle (incl. Tracing, Replay) 69.86 KB (+0.01% 🔺)
CDN Bundle (incl. Tracing, Replay, Feedback) 75.15 KB (+0.01% 🔺)
CDN Bundle - uncompressed 69 KB (+0.01% 🔺)
CDN Bundle (incl. Tracing) - uncompressed 105.1 KB (+0.01% 🔺)
CDN Bundle (incl. Tracing, Replay) - uncompressed 216.74 KB (+0.01% 🔺)
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 229.57 KB (+0.01% 🔺)
@sentry/nextjs (client) 36.66 KB (+0.01% 🔺)
@sentry/sveltekit (client) 34.39 KB (+0.01% 🔺)
@sentry/node 111.76 KB (+0.01% 🔺)
@sentry/node - without tracing 89.21 KB (0%)
@sentry/aws-serverless 98.34 KB (0%)

@AbhiPrasad AbhiPrasad force-pushed the abhi-vitest-utils branch 2 times, most recently from 21f806e to 3e8f9cd Compare July 17, 2024 19:18
Copy link
Member

@chargome chargome left a comment

Choose a reason for hiding this comment

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

Seems to break browsertests bc of of the global crypto object? 🤔

Other than that looks good, thanks for updating these!

@AbhiPrasad
Copy link
Member Author

Seems to break browsertests bc of of the global crypto object

Yes need to figure out a better way to test these 🤔

@AbhiPrasad AbhiPrasad enabled auto-merge (squash) July 24, 2024 00:32
@AbhiPrasad
Copy link
Member Author

We actually can't merge this because vitest doesn't support Node 14 :/

@AbhiPrasad AbhiPrasad closed this Jul 29, 2024
auto-merge was automatically disabled July 29, 2024 15:27

Pull request was closed

@AbhiPrasad AbhiPrasad deleted the abhi-vitest-utils branch August 2, 2024 19:04
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