本文整理汇总了TypeScript中assert.deepStrictEqual函数的典型用法代码示例。如果您正苦于以下问题:TypeScript deepStrictEqual函数的具体用法?TypeScript deepStrictEqual怎么用?TypeScript deepStrictEqual使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了deepStrictEqual函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: it
it('returns an empty list for closed ranges', async function() {
const result = await getOpsBoth(this.store, ['a', 'b', 'c', 'd'], sparseSV(this.source, this.store, {from:this.v1, to:this.v1}))
// TODO: I'm not sure if this should return [from:v1, to:v1] or just [].
assert.deepStrictEqual(result, {ops:[], versions: [{from:this.v1, to:this.v1}]})
})
示例2: it
it("should have values [16909060]", () => {
assert.deepStrictEqual(TestRecord.values(record), [16909060])
})
示例3: it
it("should have keys [a]", () => {
assert.deepStrictEqual(TestRecord.keys(record), ["a"])
})
示例4: it
it('expected index sequence', function () {
assert.deepStrictEqual(indexSeq, [0, 1, 2]);
});
示例5: it
it("should have entries [[a,0], [b,0]]", () => {
assert.deepStrictEqual(TestRecord.entries(record), [
["a", 0],
["b", 0],
])
})
示例6:
return service.find({ query: { test: true } }).then((res: any) =>
assert.deepStrictEqual(res, {
params: { test: true }
})
示例7: assert
import * as timers from "timers";
// Specifically test buffer module regression.
import {Buffer as ImportedBuffer, SlowBuffer as ImportedSlowBuffer} from "buffer";
//////////////////////////////////////////////////////////
/// Assert Tests : https://nodejs.org/api/assert.html ///
//////////////////////////////////////////////////////////
namespace assert_tests {
{
assert(1 + 1 - 2 === 0, "The universe isn't how it should.");
assert.deepEqual({ x: { y: 3 } }, { x: { y: 3 } }, "DEEP WENT DERP");
assert.deepStrictEqual({ a: 1 }, { a: 1 }, "uses === comparator");
assert.doesNotThrow(() => {
const b = false;
if (b) { throw "a hammer at your face"; }
}, undefined, "What the...*crunch*");
assert.equal(3, "3", "uses == comparator");
assert.fail(1, 2, undefined, '>');
assert.ifError(0);
assert.notDeepStrictEqual({ x: { y: "3" } }, { x: { y: 3 } }, "uses !== comparator");
assert.notEqual(1, 2, "uses != comparator");