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

Parse describe blocks #7215

Closed
wants to merge 8 commits into from

Conversation

connectdotz
Copy link
Contributor

@connectdotz connectdotz commented Oct 19, 2018

Summary

enhance test file parsers (js and typescript) to

  • return describe block and hierarchical relationship (vscode-jest #351, #321, #298, , #288, #281, #135)
  • add support for template literals as test names (vscode-jest #247)
  • add support for parsing string buffers
  • fix position inconsistency between typescript and js parsers

Test plan

  • all unit tests should pass.
  • verified with vscode-jest in local build

@codecov-io
Copy link

codecov-io commented Oct 19, 2018

Codecov Report

Merging #7215 into master will increase coverage by 0.21%.
The diff coverage is 93.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7215      +/-   ##
==========================================
+ Coverage   67.25%   67.46%   +0.21%     
==========================================
  Files         248      249       +1     
  Lines        9641     9719      +78     
  Branches        3        3              
==========================================
+ Hits         6484     6557      +73     
- Misses       3156     3161       +5     
  Partials        1        1
Impacted Files Coverage Δ
packages/jest-editor-support/src/index.js 0% <0%> (ø) ⬆️
packages/jest-test-typescript-parser/src/index.js 0% <0%> (ø) ⬆️
...es/jest-editor-support/src/parsers/parser_nodes.js 95.65% <95.65%> (ø)
.../jest-editor-support/src/parsers/babylon_parser.js 96.55% <96.07%> (-2.06%) ⬇️
...t-test-typescript-parser/src/type_script_parser.js 97.87% <97.56%> (-2.13%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 814c929...210374f. Read the comment docs.

@connectdotz
Copy link
Contributor Author

@orta @seanpoulter @stephtr

Finally find the time to get this long-due feature in. This should help closing quite a few issues and unlock other cool features requested in vscode-jest... please take a look at your earliest convenience, thanks.

Copy link
Member

@orta orta left a comment

Choose a reason for hiding this comment

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

The tests look like I expect they would here - nice work

It's probably worth changing the lockfile access but other than that it's good from me

@@ -13407,7 +13407,7 @@ typedarray@^0.0.6:
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
Copy link
Member

Choose a reason for hiding this comment

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

the file access rights have changed on the lock file:100644 → 100755 might be an issue

@orta
Copy link
Member

orta commented Oct 19, 2018

Related: I have a chat with some of the jest core contributors, and we think it makes sense to move this out into it's own repo so that we can handle our own deploys and not block other PRs. It was in here originally so that we can make sure that the types in the JSON for comms between the extension and jest were stable, and it looks like it's not really changed in a year or so. So I think we're good to migrate it to jest-community, which I'm gonna look at next weekend

@connectdotz
Copy link
Contributor Author

connectdotz commented Oct 20, 2018

@orta I completely agree, let's do it. I assume you will also include the jest-test-typescript-parser.

@SimenB
Copy link
Member

SimenB commented Oct 21, 2018

Yeah, I think that's a great idea!
We should make sure to PR the changes made on the Babel 7 branch, so that work is not lost: #7016

EDIT: Also, make sure to get publish access to those modules

@orta
Copy link
Member

orta commented Oct 21, 2018

So I merged this PR into the new repo ( still working on getting tests passing on there, but a lot of it is green now ) - closing this PR

@orta orta closed this Oct 21, 2018
@kjjgibson
Copy link

Where can I follow this issue? I'd love to add a debug code lense to describe blocks in vscode-jest but I'd need the describe block parsing first.

@seanpoulter
Copy link
Contributor

seanpoulter commented Nov 15, 2018

I don't think there is an issue to follow anymore @kjjgibson. The PR was merged in jest-community/jest-editor-support.

@kjjgibson
Copy link

Aha I see, thanks @seanpoulter. I guess vscode-jest needs to be updated to use the new jest-editor-support instead of the package removed from jest in v24.

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants