本文整理汇总了TypeScript中power-assert.ok函数的典型用法代码示例。如果您正苦于以下问题:TypeScript ok函数的具体用法?TypeScript ok怎么用?TypeScript ok使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ok函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: it
it('should dispatch subscriber.', () => {
const intent = new Intent();
let called = false;
intent.subscribeEvent(() => {
called = true;
});
intent.response.for('test').subscribe(() => {});
intent.push('test');
assert.ok(called);
});
示例2: it
it('デフォルト', ()=>{
let card = new Card(Suit.Spade, 10);
assert.ok(card);
assert.ok(!card.isOpened);
});
示例4:
.then((result) => assert.ok(result));
示例5: it
it('should return index when the value is present', () => {
var minusOne = -1, two = 2;
assert.ok(ary.indexOf(two) === minusOne, 'THIS IS AN ASSERTION MESSAGE');
});
示例6: it
it('should say hello', () => {
assert.ok(true, "It's not true")
})
示例7: it
it('sets the value for the key', () => {
const actual = stock.set('somekey', 'value');
assert.ok(actual);
});
示例8: it
it('グラデーションの数', ()=> {
let g = new GradationColor(undefined, undefined, 10);
assert.ok(g.colors.length === 10);
});
示例9: it
it('should have only word characters', () => {
assert.ok(/^[A-Za-z0-9]+$/.test(getNonce()));
});