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

@bradzacher bradzacher commented Nov 17, 2020

No description provided.

@bradzacher bradzacher added the bug label Nov 17, 2020
@typescript-eslint
Copy link

@typescript-eslint typescript-eslint bot commented Nov 17, 2020

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
10 checks passed
10 checks passed
Typecheck Typecheck
Details
Unit tests Unit tests
Details
Code style and lint Code style and lint
Details
Run integration tests on primary Node.js version Run integration tests on primary Node.js version
Details
Run unit tests on other Node.js versions (10.x) Run unit tests on other Node.js versions (10.x)
Details
Run unit tests on other Node.js versions (14.x) Run unit tests on other Node.js versions (14.x)
Details
Publish the latest code as a canary version
Details
Semantic Pull Request ready to be squashed
Details
codecov/patch Coverage not affected when comparing 3333040...8fbd626
Details
codecov/project 92.80% (+0.00%) compared to 3333040
Details
@bradzacher bradzacher deleted the fix-parseWithNodeMaps branch Nov 17, 2020
`);
const tsNode = result.esTreeNodeToTSNodeMap.get(result.ast.body[0]);
expect(tsNode).toBeDefined();
expect(result.tsNodeToESTreeNodeMap.get(tsNode)).toBeDefined();

This comment has been minimized.

@fisker

fisker Nov 17, 2020
Contributor

Why not

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

Isn't it more safer?

This comment has been minimized.

@bradzacher

bradzacher Nov 17, 2020
Author Member

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.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants