當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript assert.ok函數代碼示例

本文整理匯總了TypeScript中assert.ok函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript ok函數的具體用法?TypeScript ok怎麽用?TypeScript ok使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了ok函數的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: it

		it(`verifies that 'Go To Definition' works`, async function () {
			await common.openFirstMatchFile('app.js');
			await js.goToExpressDefinition();
			await app.wait();
			assert.ok(await common.getTab('index.d.ts'), 'Tab opened when navigating to definition is not as expected.');
		});
開發者ID:naturtle,項目名稱:vscode,代碼行數:6,代碼來源:javascript.ts

示例2: ok

 .catch((err: HTTPError) => {
   ok(err instanceof HTTPError);
   equal(err.statusCode, 404);
 });
開發者ID:nkjm,項目名稱:line-bot-sdk-nodejs,代碼行數:4,代碼來源:http.spec.ts

示例3:

		let b = commands.executeCommand('vscode.diff', Uri.parse('sc:a'), Uri.parse('sc:b')).then(value => {
			assert.ok(value === void 0);
			registration.dispose();
		});
開發者ID:DiLRandI,項目名稱:vscode,代碼行數:4,代碼來源:commands.test.ts

示例4: assertTextAreaState

	function assertTextAreaState(actual: TextAreaState, value: string, selectionStart: number, selectionEnd: number): void {
		let desired = new TextAreaState(value, selectionStart, selectionEnd, null, null);
		assert.ok(equalsTextAreaState(desired, actual), desired.toString() + ' == ' + actual.toString());
	}
開發者ID:AlexxNica,項目名稱:sqlopsstudio,代碼行數:4,代碼來源:textAreaState.test.ts

示例5: test

	test('#7013 - input without options', function () {
		const source = new CancellationTokenSource();
		let p = window.showInputBox(undefined, source.token);
		assert.ok(typeof p === 'object');
		source.dispose();
	});
開發者ID:DonJayamanne,項目名稱:vscode,代碼行數:6,代碼來源:window.test.ts

示例6: reprinter

 var reprintedLines = reprinter(function() {
   assert.ok(false, "should not have called print function");
 });
開發者ID:benjamn,項目名稱:recast,代碼行數:3,代碼來源:patcher.ts

示例7:

			$trySaveDocument(uri: URI) {
				assert.ok(!saved);
				saved = uri;
				return Promise.resolve(true);
			}
開發者ID:VishalMadhvani,項目名稱:vscode,代碼行數:5,代碼來源:extHostDocumentData.test.ts

示例8:

		let noTokens = (lineStream) => {
			assert.equal(lineStream.pos(), 0);
			assert.ok(lineStream.eos());
		};
開發者ID:asotog,項目名稱:vscode,代碼行數:4,代碼來源:lineStream.test.ts


注:本文中的assert.ok函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。