本文整理汇总了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}]})
})
开发者ID:josephg,项目名称:statecraft,代码行数:5,代码来源:common.ts
示例2: it
it("should have values [16909060]", () => {
assert.deepStrictEqual(TestRecord.values(record), [16909060])
})
开发者ID:mysticatea,项目名称:bre,代码行数:3,代码来源:uint32.ts
示例3: it
it("should have keys [a]", () => {
assert.deepStrictEqual(TestRecord.keys(record), ["a"])
})
开发者ID:mysticatea,项目名称:bre,代码行数:3,代码来源:int16.ts
示例4: it
it('expected index sequence', function () {
assert.deepStrictEqual(indexSeq, [0, 1, 2]);
});
开发者ID:saneyuki,项目名称:karen,代码行数:3,代码来源:test_flatMap.ts
示例5: it
it("should have entries [[a,0], [b,0]]", () => {
assert.deepStrictEqual(TestRecord.entries(record), [
["a", 0],
["b", 0],
])
})
开发者ID:mysticatea,项目名称:bre,代码行数:6,代码来源:bit1.ts
示例6:
return service.find({ query: { test: true } }).then((res: any) =>
assert.deepStrictEqual(res, {
params: { test: true }
})
开发者ID:feathersjs,项目名称:feathers,代码行数:4,代码来源:client.test.ts
示例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");
开发者ID:hongshanzhu,项目名称:DefinitelyTyped,代码行数:31,代码来源:node-tests.ts
注:本文中的assert.deepStrictEqual函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论