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