本文整理匯總了TypeScript中power-assert.strictEqual函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript strictEqual函數的具體用法?TypeScript strictEqual怎麽用?TypeScript strictEqual使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了strictEqual函數的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: done
.then(() => {
td.verify(ga('create', captor.capture()), { ignoreExtraArgs: true });
td.verify(ga('send', 'pageview', captor.capture()));
assert.strictEqual(captor.values[0], expectedId);
assert.strictEqual(captor.values[1].page, expectedPath);
done();
})
示例2: done
.then(() => {
for (const key of Object.keys(expectedObj)) {
const expected = expectedObj[key];
assert.strictEqual(sush.stock.get(key), expected);
}
done();
})
示例3: setTimeout
setTimeout(() => {
assert.strictEqual(dispatched.length, 3);
nodeAssert.deepStrictEqual(dispatched[0], {
type: WorkerPostEventType.INITIALIZED,
payload: {
base: 1,
test: 1,
test2: 1,
test3: 0,
},
});
nodeAssert.deepStrictEqual(dispatched[1], {
type: WorkerPostEventType.UPDATE,
payload: {
base: 2,
test: 2,
test2: 1,
test3: 1,
},
});
nodeAssert.deepStrictEqual(dispatched[2], {
type: WorkerPostEventType.DISPATCHED,
payload: { type: 'test', payload: 1 },
});
done();
}, WAIT_TIME_MS);
示例4: it
it('returns lower-case if mode is \'lower\'', () => {
const expected = 'lowercase';
const key = 'LOWERCASE';
stock = new Stock({ mode: 'lower' });
const actual = (stock as any)._convertKey(key);
assert.strictEqual(actual, expected);
});
示例5: it
it('should have the same properties as the input', () => {
assert.strictEqual(twix.config.consumerKey, config.consumerKey);
assert.strictEqual(twix.config.consumerSecret, config.consumerSecret);
assert.strictEqual(twix.config.accessToken, config.accessToken);
assert.strictEqual(twix.config.accessTokenSecret, config.accessTokenSecret);
});
示例6: done
.then(() => {
assert.strictEqual(sush.stock.get('example'), 'https://example.com');
assert.strictEqual(sush.stock.get('google'), 'https://google.com');
done();
})
示例7: it
it('passes \'default\' as mode to Store if mode is none', () => {
const expected = 'default';
const sush = new SUSH();
const actual = sush.stock.mode;
assert.strictEqual(actual, expected);
});