当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript MockTestRunner.stdErrContained方法代码示例

本文整理汇总了TypeScript中vsts-task-lib/mock-test.MockTestRunner.stdErrContained方法的典型用法代码示例。如果您正苦于以下问题:TypeScript MockTestRunner.stdErrContained方法的具体用法?TypeScript MockTestRunner.stdErrContained怎么用?TypeScript MockTestRunner.stdErrContained使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在vsts-task-lib/mock-test.MockTestRunner的用法示例。


在下文中一共展示了MockTestRunner.stdErrContained方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: it

    it("fails if alert rule name is configured for some other resource", (done: MochaDone) => {
    	let tmr : MockTestRunner = new MockTestRunner(path.join(__dirname, "L0AlertRuleNameConflictFail.js"));
        tmr.run();

        assert(tmr.stderr.length > 0 || tmr.errorIssues.length > 0, "should have written to stderr");
        let expectedError = "loc_mock_AlertRuleTargetResourceIdMismatchError Rule1 /subscriptions/sId/resourceGroups/testRg/providers/testResource.provider/type/testResourceName2";
        assert(tmr.stdErrContained(expectedError) || tmr.createdErrorIssue(expectedError), "should have thrown proper error message");
        assert(tmr.failed, "task should have failed");
    	done();
    });
开发者ID:bleissem,项目名称:vsts-tasks,代码行数:10,代码来源:L0.ts

示例2: it

    it('fails if could not fetch all network interfaces in resource group', (done: MochaDone) => {
        let tp = path.join(__dirname, 'L0TaskFailNetworkInterfaceRG.js');
        let tmr : ttm.MockTestRunner = new ttm.MockTestRunner(tp);
        tmr.run();

        assert(tmr.stderr.length > 0 || tmr.errorIssues.length > 0, 'should have written to stderr');
        assert(tmr.stdErrContained("loc_mock_CouldNotFetchNetworkInterfacesInRg") || tmr.createdErrorIssue("loc_mock_CouldNotFetchNetworkInterfacesInRg"), "should have said : loc_mock_CouldNotFetchNicDetails");
        assert(tmr.failed, 'task should have failed');
        done();
    });
开发者ID:DarqueWarrior,项目名称:vsts-tasks,代码行数:10,代码来源:L0.ts

示例3: it

    it('Fails if XDT Transformation throws error (Mock)', (done) => {
        let tp = path.join(__dirname, 'L0WindowsXdtTransformationFail.js');
        let tr : ttm.MockTestRunner = new ttm.MockTestRunner(tp);
        tr.run();

        var expectedErr = 'Error: loc_mock_XdtTransformationErrorWhileTransforming C:\\tempFolder\\web.config C:\\tempFolder\\web.Release.config';
        assert(tr.invokedToolCount == 1, 'should have invoked tool only once');
        assert(tr.stderr.length > 0 || tr.errorIssues.length > 0, 'should have written to stderr');
        assert(tr.stdErrContained(expectedErr) || tr.createdErrorIssue(expectedErr), 'E should have said: ' + expectedErr);
        assert(tr.failed, 'task should have failed');
        done();
        });
开发者ID:DarqueWarrior,项目名称:vsts-tasks,代码行数:12,代码来源:L0.ts

示例4: it

    it('Fails if package or folder name is invalid', (done) => {
        let tp = path.join(__dirname, 'L0WindowsNoPackage.js');
        let tr : ttm.MockTestRunner = new ttm.MockTestRunner(tp);
        
		tr.run();
		
		assert(tr.invokedToolCount == 0, 'should not have invoked any tool');
        assert(tr.stderr.length > 0 || tr.errorIssues.length > 0, 'should have written to stderr');
        var expectedErr = 'Error: loc_mock_Nopackagefoundwithspecifiedpattern'; 
        assert(tr.stdErrContained(expectedErr) || tr.createdErrorIssue(expectedErr), 'should have said: ' + expectedErr); 
        assert(tr.failed, 'task should have failed');
        done();
    });
开发者ID:mthalman-msft,项目名称:vsts-tasks,代码行数:13,代码来源:L0.ts


注:本文中的vsts-task-lib/mock-test.MockTestRunner.stdErrContained方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。