Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

File tests include too many tests #2144

Closed
JPMoresmau opened this issue Nov 25, 2018 · 2 comments
Closed

File tests include too many tests #2144

JPMoresmau opened this issue Nov 25, 2018 · 2 comments

Comments

@JPMoresmau
Copy link
Contributor

JPMoresmau commented Nov 25, 2018

Steps to Reproduce:

  1. Create two go test files, one with two test functions like TestA and TestB, the other with one test function TestAA
  2. Choose "run file tests" on first file
  3. TestAA runs too
  4. This is because the regexp generated is ^TestA|TestB$, it should be ^(TestA|TestB)$.

Code is in src/testUtils.ts:
util.format('^%s$', testFunctions.join('|'))

Should be util.format('^(%s)$', testFunctions.join('|'))

I can try to submit a PR if the change is confirmed, thanks.

@ramya-rao-a
Copy link
Contributor

Nice catch!
Yes that change looks right. Please go ahead and submit the PR.

@ramya-rao-a
Copy link
Contributor

The fix for this is now out in the latest update to the Go extension (0.8.0)
Thanks @JPMoresmau!

@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants