-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
refactor(tests): Migrate Env, ClassRegistry, Rect to vitest #10557
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
Conversation
Review or Edit in CodeSandboxOpen the branch in Web Editor • VS Code • Insiders |
Build Stats
|
src/env/env.spec.ts
Outdated
|
||
describe('env', () => { | ||
afterEach(() => { | ||
delete global.window; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think we should use globalThis rather than global because it has interop between browser and node
Probably doesnt matter for this test because I assume this test will not run in the browser in the future?
But just to get used to globalThis over global
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes i think yes, this global interaction i also think it broke several things
I m not sure the env test with imports and requires make sense |
Maybe thinga are off because it goes through vite-node resolution and not native node resolution |
Maybe this test should be done on compiled dist from e2e? |
Or maybe there isn't much to test. Probably a single one off kind of test is fine but is not a priority. |
|
That is why i left it for the end, didnt want to fry up my brain straight at the beginning |
I didn't expect it to be so annoying. I was like, look a short test a quick win. |
Haha yeah, thought the same |
Description
Migrate more tests to vitests