-
Notifications
You must be signed in to change notification settings - Fork 448
Conversation
It also parses out the team project name from the first mapping
Hi @jpricketMSFT, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!
TTYL, MSBOT; |
import { TfvcError } from "../../../src/tfvc/tfvcerror"; | ||
import { IExecutionResult, IWorkspace } from "../../../src/tfvc/interfaces"; | ||
|
||
var chai = require("chai"); |
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.
Either before or after going in, we should make the same change as in my last PR (import chai).
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.
will do
var assert = chai.assert; | ||
chai.should(); | ||
|
||
describe("FindWorkspaceCommand", 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.
Perhaps we should have a prefix like "Tfvc-" on the describe so we can immediately see that it's a part of that extension?
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.
done
@@ -16,7 +16,18 @@ export class TfvcError { | |||
tfvcErrorCode: string; | |||
tfvcCommand: string; | |||
|
|||
public constructor(data: ITfvcErrorData) { | |||
public constructor(data: ITfvcErrorData | string) { | |||
if (typeof data === "string") { |
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'm confused... why allow typeof "string" in the constructor if it's an error?
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 wanted a quick way of creating a "missing argument exception". I agree it is confusing. I will create a static method instead.
It also parses out the team project name from the first mapping