Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Updated FindWorkspace to get mappings #71

Merged
merged 2 commits into from
Jan 30, 2017
Merged

Conversation

jpricket
Copy link
Member

It also parses out the team project name from the first mapping

It also parses out the team project name from the first mapping
@msftclas
Copy link

Hi @jpricketMSFT, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!


It looks like you're a Microsoft contributor (Jason Prickett). If you're full-time, we DON'T require a Contribution License Agreement. If you are a vendor, please DO sign the electronic Contribution License Agreement. It will take 2 minutes and there's no faxing! https://cla.microsoft.com.

TTYL, MSBOT;

import { TfvcError } from "../../../src/tfvc/tfvcerror";
import { IExecutionResult, IWorkspace } from "../../../src/tfvc/interfaces";

var chai = require("chai");
Copy link
Contributor

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).

Copy link
Member Author

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() {
Copy link
Contributor

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?

Copy link
Member Author

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") {
Copy link
Contributor

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?

Copy link
Member Author

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.

@jpricket jpricket merged commit b0fb075 into master Jan 30, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants