Provide dependency globally? #818
-
Hey guys! I started playing around with Vitest and I really like it so far, thanks for creating such an amazing tool! I'm currently migrating a Project that uses msal-browser for authentication. Using Jest, I could do this globally as shown here. Is there an equivalent in Vitest to this? Or should I use the globalSetup? Cheers! Patrik |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Don't think import crypto from 'crypto'
globalThis.crypto = crypto |
Beta Was this translation helpful? Give feedback.
-
Add the following using setupFiles: import crypto from 'crypto'
globalThis.window.crypto = crypto; |
Beta Was this translation helpful? Give feedback.
Add the following using setupFiles: