Removed deep copy tests since it was replaced with a native function
All checks were successful
Build / Build NPM Project (push) Successful in 43s
Build / Tag Version (push) Successful in 6s

This commit is contained in:
Zakary Timson 2024-09-22 03:13:22 -04:00
parent e8e56a3f72
commit 3bf8c7bd09

View File

@ -29,28 +29,6 @@ describe('Object Utilities', () => {
});
});
describe('deepCopy', () => {
const copy = deepCopy(TEST_OBJECT);
test('Array of arrays', () => {
const a = [[1, 2], [3, 4]];
const b = deepCopy(a);
b[0][1] = 5;
expect(a).not.toEqual(b);
});
test('Change array inside object', () => {
copy.b[1] = [1, 1, 1];
expect(copy.b[1]).not.toEqual(TEST_OBJECT.b[1]);
});
test('Change object inside object', () => {
copy.g = {h: Math.random()};
expect(copy.g).not.toEqual(TEST_OBJECT.g);
});
test('Change object property inside nested array', () => {
copy.c.d[0][0].e = -1;
expect(copy.c.d[0][0].e).not.toEqual(TEST_OBJECT.c.d[0][0].e);
});
});
describe('dotNotation', () => {
test('no object or properties', () => {
expect(dotNotation(undefined, 'z')).toStrictEqual(undefined);