Remove use of assert.equal from the code (#118667)
This commit is contained in:
parent
1968bda7e6
commit
78d3cc3fea
1 changed files with 15 additions and 13 deletions
|
@ -147,12 +147,12 @@ suite('Objects', () => {
|
|||
};
|
||||
|
||||
let diff = objects.distinct(base, base);
|
||||
assert.deepEqual(diff, {});
|
||||
assert.strictEqual(Object.keys(diff).length, 0);
|
||||
|
||||
let obj = {};
|
||||
|
||||
diff = objects.distinct(base, obj);
|
||||
assert.deepEqual(diff, {});
|
||||
assert.strictEqual(Object.keys(diff).length, 0);
|
||||
|
||||
obj = {
|
||||
one: 'one',
|
||||
|
@ -160,7 +160,7 @@ suite('Objects', () => {
|
|||
};
|
||||
|
||||
diff = objects.distinct(base, obj);
|
||||
assert.deepEqual(diff, {});
|
||||
assert.strictEqual(Object.keys(diff).length, 0);
|
||||
|
||||
obj = {
|
||||
three: {
|
||||
|
@ -170,7 +170,7 @@ suite('Objects', () => {
|
|||
};
|
||||
|
||||
diff = objects.distinct(base, obj);
|
||||
assert.deepEqual(diff, {});
|
||||
assert.strictEqual(Object.keys(diff).length, 0);
|
||||
|
||||
obj = {
|
||||
one: 'two',
|
||||
|
@ -182,10 +182,9 @@ suite('Objects', () => {
|
|||
};
|
||||
|
||||
diff = objects.distinct(base, obj);
|
||||
assert.deepEqual(diff, {
|
||||
one: 'two',
|
||||
four: true
|
||||
});
|
||||
assert.strictEqual(Object.keys(diff).length, 2);
|
||||
assert.strictEqual(diff.one, 'two');
|
||||
assert.strictEqual(diff.four, true);
|
||||
|
||||
obj = {
|
||||
one: null,
|
||||
|
@ -197,10 +196,9 @@ suite('Objects', () => {
|
|||
};
|
||||
|
||||
diff = objects.distinct(base, obj);
|
||||
assert.deepEqual(diff, {
|
||||
one: null,
|
||||
four: undefined
|
||||
});
|
||||
assert.strictEqual(Object.keys(diff).length, 2);
|
||||
assert.strictEqual(diff.one, null);
|
||||
assert.strictEqual(diff.four, undefined);
|
||||
|
||||
obj = {
|
||||
one: 'two',
|
||||
|
@ -210,7 +208,11 @@ suite('Objects', () => {
|
|||
};
|
||||
|
||||
diff = objects.distinct(base, obj);
|
||||
assert.deepEqual(diff, obj);
|
||||
assert.strictEqual(Object.keys(diff).length, 4);
|
||||
assert.strictEqual(diff.one, 'two');
|
||||
assert.strictEqual(diff.two, 3);
|
||||
assert.strictEqual(diff.three?.['3'], false);
|
||||
assert.strictEqual(diff.four, true);
|
||||
});
|
||||
|
||||
test('getCaseInsensitive', () => {
|
||||
|
|
Loading…
Reference in a new issue