当前位置: 首页>>代码示例>>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;未经允许,请勿转载。