-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
resolve.alias
does not resolve correctly when been resolved as soft links in node_modules
#4842
Comments
Why you don't expect them? |
Because I have |
And how is |
@sheremet-va Yes, this could be a complicated issue. I'm using eslint will resolve mdx plugin automatically in the test cases. (Non-flat config mode) |
So, try adding the library to |
@sheremet-va Seems not working neither. |
Inlining your own package doesn't do anything - your source code is already inlined. The option is located inside |
So what should I do then? I can not inline eslint because I have to use setup file which includes a specific eslint subpath to preload it for testing. This approach works well with jest. See also https://github.com/mdx-js/eslint-mdx/blob/master/package.json#L86-L88 |
I don't know how |
Also, it's possible that you have this file in your coverage because coverage includes all files under "include" by default. You can disable it with this config: export default {
test: {
coverage: {
all: false
}
}
} Or you can also include only required files: export default {
test: {
coverage: {
include: ['./packages/*/src/**/*.ts']
}
}
} |
The main issue is eslint will load the eslint-plugin-mdx and run some test cases, but if lib folder is resolved, the coverage reported will be totally unexpected, eslint related test cases will not increase the coverage because of the lib folder. |
The issue with the coverage has nothing to do with |
@sheremet-va I don't quite understand what's your meaning. |
Use this config options for coverage: export default defineConfig({
test: {
coverage: {
provider: 'istanbul',
all: false,
}
}
}) It will only include files that you import in your tests. |
@sheremet-va Is that really working as expected? Only the |
cc @AriPerkkio |
Files that were loaded through Vite are present on coverage report. I guess ESLint loads your files using Minimal reproduction would also be nice. I'm not quite sure what I'm looking at here. |
Yes. OK, I'll try to provide a minimal reproduction. |
There's some discussion about coverage and
But the main thing is that Vite intercepts only |
Thanks for your references, I think I have to stick on jest for now. |
Describe the bug
----------------------------------|---------|----------|---------|---------|-------------------
I'd expect no
eslint-mdx/lib
andeslint-plugin-mdx/lib
files here.Reproduction
https://github.com/mdx-js/eslint-mdx/actions/runs/7378227896/job/20073106362?pr=508#step:6:27
https://github.com/mdx-js/eslint-mdx/tree/build/yarn_v4
System Info
Used Package Manager
yarn
Validations
The text was updated successfully, but these errors were encountered: