本文整理汇总了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.');
});
示例2: ok
.catch((err: HTTPError) => {
ok(err instanceof HTTPError);
equal(err.statusCode, 404);
});
示例3:
let b = commands.executeCommand('vscode.diff', Uri.parse('sc:a'), Uri.parse('sc:b')).then(value => {
assert.ok(value === void 0);
registration.dispose();
});
示例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());
}
示例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();
});
示例6: reprinter
var reprintedLines = reprinter(function() {
assert.ok(false, "should not have called print function");
});
示例7:
$trySaveDocument(uri: URI) {
assert.ok(!saved);
saved = uri;
return Promise.resolve(true);
}
示例8:
let noTokens = (lineStream) => {
assert.equal(lineStream.pos(), 0);
assert.ok(lineStream.eos());
};