本文整理匯總了TypeScript中azure-pipelines-task-lib/mock-test.MockTestRunner.ran方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript MockTestRunner.ran方法的具體用法?TypeScript MockTestRunner.ran怎麽用?TypeScript MockTestRunner.ran使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類azure-pipelines-task-lib/mock-test.MockTestRunner
的用法示例。
在下文中一共展示了MockTestRunner.ran方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: it
it('Task defaults - v4.127.0', function (done: MochaDone) {
this.timeout(1000);
let tp = path.join(__dirname, 'L0TaskDefaults_4.127.0.js');
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
tr.run();
//scheme
assert(tr.ran('/home/bin/xcodebuild -workspace /user/build/fun.xcodeproj/project.xcworkspace -list'),
'xcodebuild for listing schemes should have been run.');
//version
assert(tr.ran('/home/bin/xcodebuild -version'),
'xcodebuild for version should have been run.');
//build
assert(tr.ran('/home/bin/xcodebuild -sdk $(SDK) -configuration $(Configuration) ' +
'-workspace /user/build/fun.xcodeproj/project.xcworkspace -scheme funScheme build ' +
'CODE_SIGNING_ALLOWED=NO'),
'xcodebuild for building the ios project/workspace should have been run.');
assert(tr.invokedToolCount == 3, 'should have run xcodebuild for scheme list, version and build.');
assert(tr.stderr.length === 0, 'should not have written to stderr');
assert(tr.succeeded, 'task should have succeeded');
done();
});