本文整理匯總了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');
});