refactor: remove DeepEqual (#59569)

This commit is contained in:
Oliver Eyton-Williams
2025-04-03 18:02:05 +02:00
committed by GitHub
parent fb10a28554
commit 3f3b1b4b9c
9 changed files with 75 additions and 119 deletions

View File

@@ -27,10 +27,6 @@ async function initTestFrame(e: InitTestFrameArg = { code: {} }) {
};
/* eslint-disable @typescript-eslint/no-unused-vars */
// Fake Deep Equal dependency
const DeepEqual = (a: Record<string, unknown>, b: Record<string, unknown>) =>
JSON.stringify(a) === JSON.stringify(b);
// Hardcode Deep Freeze dependency
const DeepFreeze = (o: Record<string, unknown>) => {
Object.freeze(o);

View File

@@ -80,11 +80,6 @@ const __utils = (() => {
};
})();
// Fake Deep Equal dependency
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const DeepEqual = (a: unknown, b: unknown) =>
JSON.stringify(a) === JSON.stringify(b);
// We can't simply import these because of how webpack names them when building
// the bundle. Since both assert and __helpers have to exist in the global
// scope, we have to declare them.