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(test): pre-import test config files byimport.meta.glob #685

Merged
merged 5 commits into from Mar 28, 2024

Conversation

Dunqing
Copy link
Member

@Dunqing Dunqing commented Mar 28, 2024

Description

Get all configs at compile time. It won't slow down spawning tests.

One downside is that we can't get the type of import.meta.glob from vitest

Test Plan


Copy link

netlify bot commented Mar 28, 2024

Deploy Preview for rolldown-rs canceled.

Name Link
🔨 Latest commit ee97a5f
🔍 Latest deploy log https://app.netlify.com/sites/rolldown-rs/deploys/660578e1351d320009a09e04

@@ -1,33 +1,25 @@
/// <reference types="vite/client" />
Copy link
Member

Choose a reason for hiding this comment

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

Feel this not ideal. Maybe vitest could exposed these from https://github.com/vitest-dev/vitest/blob/main/packages/vitest/importMeta.d.ts.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, I will report this issue to vitest

@hyf0
Copy link
Member

hyf0 commented Mar 28, 2024

Adding vite in devDependencies should be fine.

@Dunqing
Copy link
Member Author

Dunqing commented Mar 28, 2024

Adding vite in devDependencies should be fine.

OK, we can't avoid installing vite unless vitest reexported vite/client

@hyf0 hyf0 changed the title chore: improve rolldown test based on import.meta.glob chore(test): pre-import test config files byimport.meta.glob Mar 28, 2024
@hyf0 hyf0 merged commit 31926bd into main Mar 28, 2024
15 checks passed
@hyf0 hyf0 deleted the refactor/improve-fixture-implementation2 branch March 28, 2024 15:11
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.

None yet

2 participants