-
Notifications
You must be signed in to change notification settings - Fork 646
go.test.file always passes if current file is not test file #303
Comments
Technically
What would you suggest doing here? PR's welcome. |
But if fact no tests were run. I suggest to either run tests in |
I think it's a very good idea to auto map current go file to its test file foo.go map to foo_test.go go has its standard name convention here |
Inlcuding @ironcladlou here, as he had originally written the test related commands in the Go extension. @ironcladlou Thoughts? I agree with @AlekSi and @davyzhang that we can map the test file as per naming conventions |
A bit of background: the current "test file" implementation works like this:
The reason it works this way is because Given the design of the function, which is to actively collect and execute tests, it seems reasonable to me that the command should not bother executing It also seems reasonable to add an additional check in the test function scanning logic to return early if the current file doesn't appear to be a |
…ild-i * 'master' of github.com:Microsoft/vscode-go: Moved debugging doc to a separate wiki Make a copy of process.env when setting VSCODE_GOTOOLS Debugger cannot read settings Improve error handling of test coverage (microsoft#721) Use proper plurality in output (microsoft#720) Fixes microsoft#303 Dont run test if current file is not test file Added a note on how to debug single tests Allow Go tools to be installed in a separate GOPATH (microsoft#351) Fix typo in README.md (microsoft#715) Honor the 'cwd' launch configuration argument (microsoft#714)
The latest update (0.6.53) has the fix to this issue. |
If I invoke
go.test.file
when current file is not a test file, it says "Success: Tests passed.", but in fact, no tests were run.go.test.cursor
handles this situation,go.test.package
works as expected.The text was updated successfully, but these errors were encountered: