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

[BUG] Cannot find module 'virtual:meta-layouts' from 'src/router/routes.ts' #1178

Open
SeTioss opened this issue Sep 9, 2024 · 2 comments
Open

Comments

@SeTioss
Copy link

SeTioss commented Sep 9, 2024

[>]hi! Guys, why can I find this file when I run dev, but I can't find it when testing with jest

image

image
This is my jest.config
`module.exports = {
roots: [
'/src'
],
testMatch: [
'/src//tests//.{vue,js,jsx,ts,tsx}',
'/src/**/
.{spec,test}.{vue,js,jsx,ts,tsx}',
],
moduleNameMapper: {
'^@/(.*)$': '/src/$1',
"\.(css|less|scss|sass)$": "identity-obj-proxy",
"\.(jpg|jpeg|png|gif|svg)$": "/mocks/fileMock.js",
},

testEnvironment: 'jsdom',
transform: {
'^.+\.(vue)$': '/node_modules/vue-jest',
'^.+\.ts$': 'ts-jest',
'^.+\.(js|jsx|mjs|cjs|ts|tsx)$': 'babel-jest',
'^.+\.js$': 'babel-jest'
},
transformIgnorePatterns: [

],
moduleFileExtensions: [
'vue',
'js',
'jsx',
'ts',
'tsx',
'json',
'node',
],
resetMocks: true,
};
`
This is the address of the package. Are there two node_comodules causing Jest to not find this file?

/node_modules.pnpm\[email protected][email protected]_@[email protected]@1.77.8 [email protected]_s4qqz6wlzfvghujxi4wiatvzym\node modules\vite-plugin-vue-meta-layouts\client.d.ts

@connectdotz
Copy link
Collaborator

Hi, @SeTioss, first we need to determine if this is an extension issue or a jest config issue: Can you run jest CLI directly from a terminal? Does it work? If it works in a terminal, then it should work with the extension.

@SeTioss
Copy link
Author

SeTioss commented Sep 10, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants