-
-
Notifications
You must be signed in to change notification settings - Fork 79
test: move to vitest
#269
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
base: master
Are you sure you want to change the base?
test: move to vitest
#269
Conversation
@@ -134,6 +144,7 @@ function analyze(ast, parserOptions) { | |||
key !== "tokens" && | |||
key !== "trailingComments" && | |||
typeof value === "object" && | |||
// @ts-expect-error -- ignore | |||
(typeof value.type === "string" || Array.isArray(value)) |
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.
It seems value
is always null
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.
Should I update the logic here? It seems that this part is currently dead code.
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.
Yeah. I think getFallbackKeys
should probably always return []
.
However, it's fine if you fix it in this PR or we fix it in another PR.
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 found similar logic in src
:
vue-eslint-parser/src/ast/traverse.ts
Line 39 in 62321db
function fallbackKeysFilter(this: any, key: string): boolean { |
I think we can fix it in another PR with more discussions.
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 that src/ast/traverse.ts
's fallbackKeysFilter
is correct as a process. It assigns to value
at L49 😄
vue-eslint-parser/src/ast/traverse.ts
Line 49 in 62321db
(value = this[key]) !== null && |
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.
But, I think it might be a good idea to refactor it to make it easier to read.
Thank you for working on migrating the testing infrastructure!!! |
I've updated some of the type definitions in Additionally, I used some |
No description provided.