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

fix(typescript-estree): parseWithNodeMaps returning empty maps #2773

Merged
merged 1 commit into from Nov 17, 2020

Conversation

bradzacher
Copy link
Member

No description provided.

@bradzacher bradzacher added the bug Something isn't working label Nov 17, 2020
@typescript-eslint
Copy link
Contributor

Thanks for the PR, @bradzacher!

typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community.

The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately.

Thanks again!


🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint. As a thank you, your profile/company logo will be added to our main README which receives thousands of unique visitors per day.

@bradzacher bradzacher merged commit 3e4a0ed into master Nov 17, 2020
@bradzacher bradzacher deleted the fix-parseWithNodeMaps branch November 17, 2020 03:25
`);
const tsNode = result.esTreeNodeToTSNodeMap.get(result.ast.body[0]);
expect(tsNode).toBeDefined();
expect(result.tsNodeToESTreeNodeMap.get(tsNode)).toBeDefined();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not

expect(result.tsNodeToESTreeNodeMap.get(tsNode)).toBe(result.ast.body[0]);

Isn't it more safer?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically yes - but there are other tests which test the maps (sort of). So it's "good enough" to assert that there's something there.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants