-
Notifications
You must be signed in to change notification settings - Fork 448
Fixing the version output and adding tests #82
Conversation
Hi @jpricketMSFT, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!
TTYL, MSBOT; |
src/tfvc/commands/commandhelper.ts
Outdated
|
||
// Ignore WARNings that may be above the desired lines | ||
if (skipWarnings) { | ||
let index = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd love me a type on this
@@ -49,7 +50,7 @@ export class FindWorkspace implements ITfvcCommand<IWorkspace> { | |||
} | |||
|
|||
// Find the workspace name and collectionUrl | |||
const lines = stdout.replace("\r\n", "\n").split("\n"); | |||
const lines = CommandHelper.SplitIntoLines(stdout); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
type here too?
src/tfvc/commands/getversion.ts
Outdated
@@ -23,8 +24,12 @@ export class GetVersion implements ITfvcCommand<string> { | |||
} | |||
|
|||
public async ParseOutput(executionResult: IExecutionResult): Promise<string> { | |||
const stdout = executionResult.stdout; | |||
const lines = CommandHelper.SplitIntoLines(executionResult.stdout); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
type-ola? (missed it last time)
assert.equal(lines[4], ""); | ||
}); | ||
|
||
it("should verify SplitIntoLines - leave WARNings", function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add a test where there's a non-WARN line between two WARN lines? Is that a possible scenario?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not that I have seen WARNings all come before the actual output of the command. So we simply strip them from the top.
No description provided.