Jasmine duplicates test cases to subsequent files
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 52/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- javascript, node.js
- Domain
- testing-qa
Research direction
Start at Nodejs/Product/TestAdapter/TestFrameworks/Jasmine/jasmine.js around lines 115-126, where the Jasmine instance is created and files are processed. Reproduce with a .NET Standard project containing two or more test files, then verify that each test case appears only under its own file after rebuilding the project.
Written by the indexing model from the issue text.
Description
Expected Behavior
Test cases are just listed under the file they exist in
Actual Behavior
Test cases are also listed under all subsequent files
I think the issue might be some form of caching in here.
https://github.com/microsoft/nodejstools/blob/587d04559aaef7288c51ef8420fff67c38257006/Nodejs/Product/TestAdapter/TestFrameworks/Jasmine/jasmine.js#L115-L126
If I move the creation of the jasmine instance (Lines 115+116) inside the forEach, i.e. a new one for each file, the test cases only appear for the correct file.
- NTVS Version: 1.5.20902.1 Commit Hash:b474efcb6f92db52a8f8e2e6a8cb9648476885cc
- Visual Studio Version: 16.8.0 Preview 3.2
- Node.js Version: 10.15.0
- Jasmine: 3.6.1
Steps to Reproduce
- Create a .netstandard project following https://docs.microsoft.com/en-us/visualstudio/javascript/unit-testing-javascript-with-visual-studio?view=vs-2019#unit-test-net-core-and-net-standard
- Add 2 or more test files
- Rebuild project
- 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
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
nightscout/nocturne#1379 ·
-
priority-0
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
StackExchange/StackExchange.Redis#3249 ·
-
[Feat] 조합 영역 구분선 개선 Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 72/100