Issues when testing with jest
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- javascript, nodejs, typescript
- Domain
- developer-experience, testing-qa, tooling
Research direction
Start with the linked Saulzi/nodejsissues example: restore its packages and run the tests with npx jest. Inspect package.json, node_modules, JavascriptTestRoot, and the reported source/cool.test.js path while reproducing the six discovery and configuration problems. Done means the reported Jest and TypeScript test-discovery cases have clear, verified behavior.
Written by the indexing model from the issue text.
Description
Issues
@armanio123 as discussed at https://github.com/MicrosoftDocs/visualstudio-docs/issues/1989 you can find example code at.
https://github.com/Saulzi/nodejsissues.git
you will need to restore packages etc, standard stuff.
all tests run in jest by running test with npx jest
Issue 1.
Not all tests are discovered, (because of how node-editor-support) detects tests, likewise detected tests are not correctly displayed in test hierarchy.
Issue 2.
when package.json and node_modules are in folder pointed to in JavascriptTestRoot, no tests are discovered.
[07/03/2019 10:31:20 Error] Failed to find "jest" package. "jest" must be installed in the project locally.
[07/03/2019 10:31:20 Error] Install "jest" locally using the npm manager via solution explorer
[07/03/2019 10:31:20 Error] or with ".npm install jest --save-dev" via the Node.js interactive window.
Issue 3 - think this one is already documented at (https://docs.microsoft.com/en-us/visualstudio/javascript/unit-testing-javascript-with-visual-studio?view=vs-2017), .net core projects dont work at all.
Issue 4 - typescript built using outdir does not get detected.
[07/03/2019 10:52:08 Informational] Processing: C:\Users\t.salisbury\Desktop\TestingIssues\Issues\Issue 4\source\cool.test.js
[07/03/2019 10:52:12 Error] Test discovery error: { Error: ENOENT: no such file or directory, open 'C:\Users\t.salisbury\Desktop\TestingIssues\Issues\Issue 4\source\cool.test.js'
[07/03/2019 10:52:12 Error] at Object.openSync (fs.js:439:3)
Issue 5 - does not like noemit / jest using babel
Issue 6 - does not ignore tests in node_modules
- Dominant language
- C#
- Stars
- 1.8k
- Forks
- 355
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/nodejstools
-
microsoft/nodejstools#2523 · 1 reaction · 1 assignee ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
microsoft/nodejstools#2519 · 1 comment ·
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
microsoft/nodejstools#2517 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
microsoft/nodejstools#2514 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
microsoft/nodejstools#2513 · 5 comments ·
All issues in microsoft/nodejstools
Similar issues
-
type/automation type/tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
t/bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
ci-failure-cause test-failure
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
area:auth FE mvp P3
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
klasolsson81/jobbliggaren#1788 ·