diff --git a/libs/ledger-live-common/jest.config.ts b/libs/ledger-live-common/jest.config.ts index 6fa0ddacb14d..51b7cca92ed5 100644 --- a/libs/ledger-live-common/jest.config.ts +++ b/libs/ledger-live-common/jest.config.ts @@ -35,12 +35,18 @@ if (process.env.CI) { // interface Uint8ArrayAlloc extends Uint8Array { // alloc(size: number): Uint8Array; // } -class U8a extends Uint8Array { - alloc(size: number) { - return new Uint8Array(size); - } -} - +// class U8a extends Uint8Array { +// alloc(size: number) { +// return new Uint8Array(size); +// } +// } +// Object.defineProperty(Uint8Array, "alloc", { +// writable: false, +// value: function (size: number) { +// return new Uint8Array(size); +// }, +// }); +Object.setPrototypeOf(Buffer, Uint8Array); const defaultConfig = { preset: "ts-jest", @@ -48,7 +54,7 @@ const defaultConfig = { "ts-jest": { isolatedModules: true, }, - Buffer: U8a, + // Buffer: U8a, }, testEnvironment: "node", reporters,