本文整理汇总了TypeScript中vsts-task-lib/mock-test.MockTestRunner.createdErrorIssue方法的典型用法代码示例。如果您正苦于以下问题:TypeScript MockTestRunner.createdErrorIssue方法的具体用法?TypeScript MockTestRunner.createdErrorIssue怎么用?TypeScript MockTestRunner.createdErrorIssue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类vsts-task-lib/mock-test.MockTestRunner
的用法示例。
在下文中一共展示了MockTestRunner.createdErrorIssue方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: it
it('fails when a Conda installation is not found', function () {
const testFile = path.join(__dirname, 'L0CondaNotFound.js');
const testRunner = new MockTestRunner(testFile);
testRunner.run();
assert(testRunner.createdErrorIssue('loc_mock_CondaNotFound'));
assert(testRunner.failed, 'task should have failed');
});
示例2: it
it('fails if target file is a directory', (done: MochaDone) => {
this.timeout(1000);
let testPath = path.join(__dirname, 'L0failsIfTargetFileIsDir.js');
let runner: mocktest.MockTestRunner = new mocktest.MockTestRunner(testPath);
runner.run();
assert(runner.failed, 'should have failed');
assert(runner.createdErrorIssue(`Error: loc_mock_TargetIsDir ${path.normalize('/srcDir/someOtherDir/file1.file')} ${path.normalize('/destDir/someOtherDir/file1.file')}`), 'should have created error issue');
done();
});
示例3: it
it('fails when version is not found', function () {
const testFile = path.join(__dirname, 'L0FailsWhenVersionIsMissing.js');
const testRunner = new MockTestRunner(testFile);
testRunner.run();
const errorMessage = [
'loc_mock_VersionNotFound 3.x',
'loc_mock_ListAvailableVersions',
'2.6.0 (x86)',
'2.7.13 (x86)',
'2.6.0 (x64)',
'2.7.13 (x64)'
].join(EOL);
assert(testRunner.createdErrorIssue(errorMessage));
assert(testRunner.failed, 'task should have failed');
});