-
Notifications
You must be signed in to change notification settings - Fork 63
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
support arbitrary import.meta.*
syntax (vitest insource testing)
#167
Comments
Thanks for reporting issue. I really do hope if vitest could also support But we might also think to support this specific /cc @antfu |
// in-source test suites
if (import.meta.vitest) {
const { it, expect } = import.meta.vitest
it('add', () => {
expect(add()).toBe(0)
expect(add(1)).toBe(1)
expect(add(1, 2, 3)).toBe(6)
})
} It's not just a flag, so it probably can't be in |
Thanks for explaining now it makes sense. It is different from #158 i guess the goal here is make same
|
import.meta.*
(vitest insource testing)
import.meta.*
(vitest insource testing)import.meta.*
syntax (vitest insource testing)
Yeah I think |
I've got a similar issue. I'm trying to use
|
I get this trying to use |
#300 adds a fallback loader to support this usage (need to use |
Environment
Reproduction
Describe the bug
I'm using vitest with insource testing, it uses a specific variable
import.meta.vitest
which is not supported by jiti.Additional context
No response
Logs
The text was updated successfully, but these errors were encountered: