From 525d6ad2601c3726c95507cc424a45633fe84d70 Mon Sep 17 00:00:00 2001 From: schmanu Date: Thu, 28 Mar 2024 09:37:59 +0100 Subject: [PATCH] tests: adjust jest config to work with newest sdk --- jest.config.js | 5 ++++- jest.setup.js | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/jest.config.js b/jest.config.js index 665b8bcd..6e88b8fb 100644 --- a/jest.config.js +++ b/jest.config.js @@ -15,4 +15,7 @@ const customJestConfig = { testEnvironment: 'jest-environment-jsdom', } -module.exports = createJestConfig(customJestConfig) +module.exports = async () => ({ + ...(await createJestConfig(customJestConfig)()), + transformIgnorePatterns: ['node_modules/(?!(isows)/)'], +}) diff --git a/jest.setup.js b/jest.setup.js index e643574f..8af8c3ed 100644 --- a/jest.setup.js +++ b/jest.setup.js @@ -43,3 +43,7 @@ jest.mock('@web3-onboard/core', () => () => ({ get: () => mockOnboardState, }, })) + +const { TextEncoder, TextDecoder } = require('util') +global.TextEncoder = TextEncoder +global.TextDecoder = TextDecoder