File tree Expand file tree Collapse file tree 6 files changed +12
-12
lines changed
notification-services-controller
seedless-onboarding-controller Expand file tree Collapse file tree 6 files changed +12
-12
lines changed Original file line number Diff line number Diff line change 1- const JSDOMEnvironment = require ( 'jest-environment-jsdom' ) ;
1+ const { TestEnvironment } = require ( 'jest-environment-jsdom' ) ;
22
33// Custom test environment copied from https://github.com/jsdom/jsdom/issues/2524
44// in order to add TextEncoder to jsdom. TextEncoder is expected by jose.
55
6- module . exports = class CustomTestEnvironment extends JSDOMEnvironment {
6+ module . exports = class CustomTestEnvironment extends TestEnvironment {
77 async setup ( ) {
88 await super . setup ( ) ;
99 if ( typeof this . global . TextEncoder === 'undefined' ) {
Original file line number Diff line number Diff line change 1- const JSDOMEnvironment = require ( 'jest-environment-jsdom' ) ;
1+ const { TestEnvironment } = require ( 'jest-environment-jsdom' ) ;
22
33// Custom test environment copied from https://github.com/jsdom/jsdom/issues/2524
44// in order to add TextEncoder to jsdom. TextEncoder is expected by @noble /hashes.
55
6- module . exports = class CustomTestEnvironment extends JSDOMEnvironment {
6+ module . exports = class CustomTestEnvironment extends TestEnvironment {
77 async setup ( ) {
88 await super . setup ( ) ;
99 if ( typeof this . global . TextEncoder === 'undefined' ) {
Original file line number Diff line number Diff line change 1- const NodeEnvironment = require ( 'jest-environment-node' ) ;
1+ const { TestEnvironment } = require ( 'jest-environment-node' ) ;
22
33/**
44 * KeyringController depends on @noble/hashes, which as of 1.3.2 relies on the
55 * Web Crypto API in Node and browsers.
66 */
7- class CustomTestEnvironment extends NodeEnvironment {
7+ class CustomTestEnvironment extends TestEnvironment {
88 async setup ( ) {
99 await super . setup ( ) ;
1010 if ( typeof this . global . crypto === 'undefined' ) {
Original file line number Diff line number Diff line change 1- const JSDOMEnvironment = require ( 'jest-environment-jsdom' ) ;
1+ const { TestEnvironment } = require ( 'jest-environment-jsdom' ) ;
22
33/**
44 * ProfileSync SDK & Controllers depends on @noble/hashes, which as of 1.3.2 relies on the
55 * Web Crypto API in Node and browsers.
66 *
77 * There are also EIP6963 utils that utilize window
88 */
9- class CustomTestEnvironment extends JSDOMEnvironment {
9+ class CustomTestEnvironment extends TestEnvironment {
1010 async setup ( ) {
1111 await super . setup ( ) ;
1212
Original file line number Diff line number Diff line change 11/* eslint-disable n/prefer-global/text-encoder */
22/* eslint-disable n/prefer-global/text-decoder */
3- const JSDOMEnvironment = require ( 'jest-environment-jsdom' ) ;
3+ const { TestEnvironment } = require ( 'jest-environment-jsdom' ) ;
44
55/**
66 * ProfileSync SDK & Controllers depends on @noble/hashes, which as of 1.3.2 relies on the
77 * Web Crypto API in Node and browsers.
88 *
99 * There are also EIP6963 utils that utilize window
1010 */
11- class CustomTestEnvironment extends JSDOMEnvironment {
11+ class CustomTestEnvironment extends TestEnvironment {
1212 async setup ( ) {
1313 await super . setup ( ) ;
1414
Original file line number Diff line number Diff line change 1- const NodeEnvironment = require ( 'jest-environment-node' ) ;
1+ const { TestEnvironment } = require ( 'jest-environment-node' ) ;
22
33/**
44 * SeedlessOnboardingController depends on @noble/hashes, which as of 1.7.1 relies on the
55 * Web Crypto API in Node and browsers.
66 */
7- class CustomTestEnvironment extends NodeEnvironment {
7+ class CustomTestEnvironment extends TestEnvironment {
88 async setup ( ) {
99 await super . setup ( ) ;
1010 if ( typeof this . global . crypto === 'undefined' ) {
You can’t perform that action at this time.
0 commit comments