refactor(@angular-devkit/core): delete deepCopy temporary symbol property after use

The `deepCopy` utility function previously set its internal tracking symbol property to `undefined` after completion.
However, this still caused the property to exist with a value of `undefined`. Jasmine 4.1 now checks for symbols with
its `toEqual` expectation which resulted in failing tests. The internal tracking symbol property is now removed instead
via `delete`.
This commit is contained in:
Charles Lyding 2022-05-04 11:48:11 -04:00 committed by Douglas Parker
parent 0e4e490448
commit 13fce451d8

View File

@ -33,7 +33,7 @@ export function deepCopy<T>(value: T): T {
for (const key of Object.getOwnPropertyNames(valueCasted)) {
copy[key] = deepCopy(valueCasted[key]);
}
valueCasted[copySymbol] = undefined;
delete valueCasted[copySymbol];
return copy;
} else {