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

Problem walking parsed TS spec code #8

Closed
bahmutov opened this issue Dec 14, 2021 · 3 comments · Fixed by #9
Closed

Problem walking parsed TS spec code #8

bahmutov opened this issue Dec 14, 2021 · 3 comments · Fixed by #9
Labels
bug Something isn't working released

Comments

@bahmutov
Copy link
Owner

Trying to test in cypress-io/cypress-grep#95 and getting

  TypeError {
    message: 'baseVisitor[type] is not a function',
  }

  › c (node_modules/acorn-walk/dist/walk.js:29:24)
  › Object.skipThrough (node_modules/acorn-walk/dist/walk.js:186:39)
  › c (node_modules/acorn-walk/dist/walk.js:29:24)
  › Object.base.Program.base.BlockStatement.base.StaticBlock (node_modules/acorn-walk/dist/walk.js:198:7)
  › c (node_modules/acorn-walk/dist/walk.js:29:24)
  › Object.skipThrough (node_modules/acorn-walk/dist/walk.js:186:39)
  › c (node_modules/acorn-walk/dist/walk.js:29:24)
  › Object.base.Function (node_modules/acorn-walk/dist/walk.js:296:5)
  › c (node_modules/acorn-walk/dist/walk.js:29:24)
  › Object.base.FunctionDeclaration (node_modules/acorn-walk/dist/walk.js:274:62)
@bahmutov
Copy link
Owner Author

Only happens when trying to walk TS like this

interface Person {
    name: string
}

@bahmutov
Copy link
Owner Author

acornjs/acorn#829

@bahmutov bahmutov added the bug Something isn't working label Dec 14, 2021
bahmutov added a commit that referenced this issue Dec 14, 2021
Narretz added a commit to Narretz/find-test-names that referenced this issue Dec 19, 2021
Ignore nodes that acorn-walk doesn't support.
This should not affect the extraction, because
test suites are built only from CallExpressions.

Fixes bahmutov#8
Narretz added a commit to Narretz/find-test-names that referenced this issue Dec 19, 2021
Ignore nodes that acorn-walk doesn't support.
This should not affect the extraction, because
test suites are built only from CallExpressions.

Fixes bahmutov#8
bahmutov pushed a commit that referenced this issue Dec 19, 2021
* fix: improve typescript parsing

Ignore nodes that acorn-walk doesn't support.
This should not affect the extraction, because
test suites are built only from CallExpressions.

Fixes #8

* test: it inside ts class method with modifier
@github-actions
Copy link

🎉 This issue has been resolved in version 1.3.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant