當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript MockTestRunner.stdOutContained方法代碼示例

本文整理匯總了TypeScript中vsts-task-lib/mock-test.MockTestRunner.stdOutContained方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript MockTestRunner.stdOutContained方法的具體用法?TypeScript MockTestRunner.stdOutContained怎麽用?TypeScript MockTestRunner.stdOutContained使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在vsts-task-lib/mock-test.MockTestRunner的用法示例。


在下文中一共展示了MockTestRunner.stdOutContained方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: it

 it('AzureRmWebAppDeploymentV4 AzureRmWebAppDeploymentProviderTests', (done: MochaDone) => {
     let tp = path.join(__dirname,'AzureRmWebAppDeploymentProviderTests.js');
     let tr : ttm.MockTestRunner = new ttm.MockTestRunner(tp);
     try {
         tr.run();
         assert(tr.stdOutContained('Resource Group: MOCK_RESOURCE_GROUP_NAME'), 'Should have printed: Resource Group: MOCK_RESOURCE_GROUP_NAME');
         assert(tr.stdOutContained('PreDeployment steps with slot enabled should succeeded'), 'Should have printed: PreDeployment steps withSlotEnabled should succeeded');
         assert(tr.stdOutContained('Active DeploymentId :MOCK_DEPLOYMENT_ID'), 'Should have printed: Active DeploymentId :MOCK_DEPLOYMENT_ID.');
         assert(tr.stdOutContained('PreDeployment steps with virtual application should succeeded'), 'Should have printed: PreDeployment steps with slot enabled should succeeded');
         done();
     }
     catch(error) {
         done(error);
     }
 });
開發者ID:grawcho,項目名稱:vso-agent-tasks,代碼行數:15,代碼來源:L0.ts

示例2: it

    it('test command without publish test results', (done: MochaDone) => {
        this.timeout(1000);

        const tp = path.join(__dirname, './TestCommandTests/runTestsWithoutPublish.js');
        const tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);

        tr.run();
        assert(tr.invokedToolCount === 1, 'should have run dotnet once');
        assert(tr.ran('c:\\path\\dotnet.exe test c:\\agent\\home\\directory\\temp.csproj'), 'it should have run dotnet test');
        assert(tr.stdOutContained('dotnet output'), 'should have dotnet output');
        assert(!tr.stdOutContained('vso[results.publish'), 'it shouldnt contain publish command');
        assert(tr.succeeded, 'should have succeeded');
        assert.equal(tr.errorIssues.length, 0, 'should have no errors');
        done();
    });
開發者ID:grawcho,項目名稱:vso-agent-tasks,代碼行數:15,代碼來源:L0.ts

示例3: it

    it('pushes successfully to internal feed using VstsNuGetPush.exe', (done: MochaDone) => {
        this.timeout(1000);

        let tp = path.join(__dirname, './PublishTests/internalFeedVstsNuGetPush.js')
        let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);

        tr.run()
        assert(tr.invokedToolCount == 1, 'should have run VstsNuGetPush once');
        assert(tr.ran('c:\\agent\\home\\directory\\externals\\nuget\\VstsNuGetPush.exe c:\\agent\\home\\directory\\foo.nupkg -Source foobar -AccessToken token -NonInteractive'), 'it should have run NuGet');
        assert(tr.stdOutContained('setting console code page'), 'it should have run chcp');
        assert(tr.stdOutContained('VstsNuGetPush output here'), "should have VstsNuGetPush output");
        assert(tr.succeeded, 'should have succeeded');
        assert.equal(tr.errorIssues.length, 0, "should have no errors");
        done();
    });
開發者ID:colindembovsky,項目名稱:vsts-tasks,代碼行數:15,代碼來源:L0.ts

示例4: it

 it('AzureMySqlDeployment MysqlServerOperationsL0Tests', (done: MochaDone) => {
     let tp = path.join(__dirname, 'MysqlServerOperationsL0Tests.js');
     let tr : ttm.MockTestRunner = new ttm.MockTestRunner(tp);
     try {
         tr.run();
         assert(tr.stdOutContained('MysqlServerOperationsTests.MysqlServerFromServerName should has passed.') , 'Should have printed: MysqlServerOperationsTests.MysqlServerFromServerName should has passed.');
         assert(tr.stdOutContained('MysqlServerOperationsTests.MysqlServerFromServerName should have failed due to without id in mysql server.') , 'Should have printed: MysqlServerOperationsTests.MysqlServerFromServerName should have failed due to without id in mysql server.');
         assert(tr.stdOutContained('MysqlServerOperationsTests.MysqlServerFromServerName should have failed due to invalid id in mysql server.') , 'Should have printed: MysqlServerOperationsTests.MysqlServerFromServerName should have failed due to invalid id in mysql server.');
         assert(tr.stdOutContained('MysqlServerOperationsTests.MysqlServerFromServerName should have failed due to invalid mysql server name.') , 'Should have printed: MysqlServerOperationsTests.MysqlServerFromServerName should have failed due to invalid mysql server name.');
         done();
     }
     catch(error) {
         done(error);
     }
 });
開發者ID:Microsoft,項目名稱:vsts-tasks,代碼行數:15,代碼來源:L0.ts

示例5: it

    it ('install using npmrc', (done: MochaDone) => {
        this.timeout(1000);
        let tp = path.join(__dirname, 'install-npmrc.js');
        let tr = new ttm.MockTestRunner(tp);

        tr.run();

        assert.equal(tr.invokedToolCount, 3, 'task should have run npm');
        assert(tr.stdOutContained('npm install successful'), 'npm should have installed the package');
        assert(!tr.stdOutContained('OverridingProjectNpmrc'), 'install from .npmrc shoud not override project .npmrc');
        assert(!tr.stdOutContained('RestoringProjectNpmrc'), 'install from .npmrc shoud not restore project .npmrc');
        assert(tr.succeeded, 'task should have succeeded');

        done();
    });
開發者ID:bleissem,項目名稱:vsts-tasks,代碼行數:15,代碼來源:L0.ts


注:本文中的vsts-task-lib/mock-test.MockTestRunner.stdOutContained方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。