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

Add class name to the run/debug all tests #2416

Merged
merged 2 commits into from
Jul 19, 2018

Conversation

akshita31
Copy link
Contributor

runtests

The output will now look like this

@akshita31 akshita31 requested review from DustinCampbell and rchande and removed request for DustinCampbell July 13, 2018 00:22
@TheRealPiotrP
Copy link

What did the output look like before?

@akshita31
Copy link
Contributor Author

@TheRealPiotrP Just added the thing highlighted in yellow. Small change

@@ -53,23 +54,25 @@ class RunTestsCodeLens extends TestCodeLens {
constructor(
range: protocol.V2.Range,
fileName: string,
name: string,

Choose a reason for hiding this comment

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

all the other names here are qualified, fileName, testMethodNames, etc.

what does name mean??

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is the name of that particular entity, when it is a method it will be the method name, when it is the class, it will be the class name. Any suggestions ? Does DisplayName sound better ?

Copy link

Choose a reason for hiding this comment

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

+1, let's use a more informative name

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@rchande Got any suggestions for the name here?

@codecov
Copy link

codecov bot commented Jul 13, 2018

Codecov Report

Merging #2416 into master will increase coverage by 0.22%.
The diff coverage is 54.16%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2416      +/-   ##
==========================================
+ Coverage   63.05%   63.28%   +0.22%     
==========================================
  Files          88       88              
  Lines        3987     3998      +11     
  Branches      564      564              
==========================================
+ Hits         2514     2530      +16     
+ Misses       1311     1306       -5     
  Partials      162      162
Flag Coverage Δ
#integration 52.54% <12.5%> (+0.2%) ⬆️
#unit 84.66% <100%> (+0.11%) ⬆️
Impacted Files Coverage Δ
src/features/codeLensProvider.ts 45.63% <0%> (-2.41%) ⬇️
src/features/dotnetTest.ts 11.32% <0%> (ø) ⬆️
src/observers/DotnetTestLoggerObserver.ts 100% <100%> (ø) ⬆️
src/omnisharp/loggingEvents.ts 100% <100%> (ø) ⬆️
src/omnisharp/delayTracker.ts 68.42% <0%> (-5.27%) ⬇️
src/omnisharp/server.ts 71.73% <0%> (+0.35%) ⬆️
src/features/diagnosticsProvider.ts 76.81% <0%> (+6.52%) ⬆️

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 28645b2...8d2bf8f. Read the comment docs.

@@ -188,8 +191,8 @@ function createCodeLensesForElement(element: Structure.CodeElement, fileName: st
let range = element.Ranges[SymbolRangeNames.Name];

if (range && testFramework && testMethodName) {
results.push(new RunTestsCodeLens(range, fileName, /*isTestContainer*/ false, testFramework, [testMethodName]));
results.push(new DebugTestsCodeLens(range, fileName, /*isTestContainer*/ false, testFramework, [testMethodName]));
results.push(new RunTestsCodeLens(range, fileName, element.DisplayName,/*isTestContainer*/ false, testFramework, [testMethodName]));

Choose a reason for hiding this comment

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

Does TS have the equivalent of C# named arguments? It would be neat to use those instead of the comment...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is object destructuring , but should we do that here microsoft/TypeScript#467 (comment)

Copy link

Choose a reason for hiding this comment

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

That's interesting approach...

@@ -53,23 +54,25 @@ class RunTestsCodeLens extends TestCodeLens {
constructor(
range: protocol.V2.Range,
fileName: string,
name: string,
Copy link

Choose a reason for hiding this comment

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

+1, let's use a more informative name

@@ -188,8 +191,8 @@ function createCodeLensesForElement(element: Structure.CodeElement, fileName: st
let range = element.Ranges[SymbolRangeNames.Name];

if (range && testFramework && testMethodName) {
results.push(new RunTestsCodeLens(range, fileName, /*isTestContainer*/ false, testFramework, [testMethodName]));
results.push(new DebugTestsCodeLens(range, fileName, /*isTestContainer*/ false, testFramework, [testMethodName]));
results.push(new RunTestsCodeLens(range, fileName, element.DisplayName,/*isTestContainer*/ false, testFramework, [testMethodName]));
Copy link

Choose a reason for hiding this comment

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

That's interesting approach...

@akshita31 akshita31 merged commit ce95719 into dotnet:master Jul 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants