本文整理汇总了TypeScript中assert.notDeepEqual函数的典型用法代码示例。如果您正苦于以下问题:TypeScript notDeepEqual函数的具体用法?TypeScript notDeepEqual怎么用?TypeScript notDeepEqual使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了notDeepEqual函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: it
it("not empty cases due to log level", () => {
logObj.warn("testlogwarning");
assert.notDeepEqual(JSON.parse(sample), "");
logObj.error("testlogerror");
assert.notDeepEqual(JSON.parse(sample), "");
logObj.critical("testlogcritical");
assert.notDeepEqual(JSON.parse(sample), "");
});
示例2: test
test('different seeds produce identical sequences', function() {
const rng1 = createRng(1),
rng2 = createRng(2),
sequence1 = sequence(100, rng1),
sequence2 = sequence(100, rng2);
assert.notDeepEqual(sequence1, sequence2);
});
示例3: test
test('schema attributes', () => {
const schemaAttribute = adapter.getSchemaAttributes()[0];
assert.notDeepEqual(schemaAttribute, rawAdapter.configurationAttributes);
Object.keys(rawAdapter.configurationAttributes.launch).forEach(key => {
assert.deepEqual(schemaAttribute[key], rawAdapter.configurationAttributes.launch[key]);
});
assert.equal(schemaAttribute['additionalProperties'], false);
assert.equal(!!schemaAttribute['properties']['request'], true);
assert.equal(!!schemaAttribute['properties']['name'], true);
assert.equal(!!schemaAttribute['properties']['type'], true);
assert.equal(!!schemaAttribute['properties']['preLaunchTask'], true);
});
示例4: it
it("Extract Header encryption file", () => {
let extractor = getExtractor("HeaderEnc1234.rar", "1234");
let [state, list] = extractor.extractAll();
assert.deepStrictEqual(state, {
state: "SUCCESS",
});
assert.notDeepEqual(list, null);
assert.deepStrictEqual(list!.files[0]!.fileHeader, {
name: "2中文.txt",
flags: {
encrypted: true,
solid: false,
directory: false,
},
packSize: 32,
unpSize: 15,
crc: 2631402331,
time: "2017-04-03T20:09:18.000",
unpVer: "2.9",
method: "Normal",
});
assert.deepStrictEqual(list!.files[1]!.fileHeader, {
name: "1File.txt",
flags: {
encrypted: true,
solid: false,
directory: false,
},
packSize: 32,
unpSize: 5,
crc: 1468669977,
time: "2017-04-03T20:08:44.000",
unpVer: "2.9",
method: "Normal",
});
assert.deepStrictEqual(list!.files[0]!.extract[0], { state: "SUCCESS" });
assert.equal(new Buffer(list!.files[0]!.extract[1]!.subarray(0, 3)).toString("hex"), "efbbbf");
assert.equal(new Buffer(list!.files[0]!.extract[1]!.subarray(3)).toString("utf-8"), "中文中文");
assert.equal(new Buffer(list!.files[1]!.extract[1]!).toString("utf-8"), "1File");
});
示例5: it
it('should copy deeply', () => {
const structure = {
a: 1,
b: [1, 2],
c: { c1: 1, c2: '2' },
d: { d1: { d11: 'test', d12: { d123: true } } },
};
const obj: any = {
a: 2,
b: [3, 4],
c: { c1: 2, c2: '2' },
d: { d1: { d11: 'tes', d12: { d123: false } } },
};
const clone = dcp.define('test', structure);
const newObj = clone(obj);
assert.deepEqual(newObj, obj);
assert.notStrictEqual(newObj, obj);
obj.d.d11 = 'test2';
assert.notDeepEqual(newObj, obj);
});
示例6: test
test('Keep hue value when saturation is 0', () => {
assert.deepEqual(HSVA.toRGBA(new HSVA(10, 0, 0, 0)), HSVA.toRGBA(new HSVA(20, 0, 0, 0)));
assert.deepEqual(new Color(new HSVA(10, 0, 0, 0)).rgba, new Color(new HSVA(20, 0, 0, 0)).rgba);
assert.notDeepEqual(new Color(new HSVA(10, 0, 0, 0)).hsva, new Color(new HSVA(20, 0, 0, 0)).hsva);
});
示例7:
fixResults.slice(index + 1).forEach((action2) => {
assert.notDeepEqual(action1, action2);
});