-
-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update ERC20Standard to use
@metamask/abi-utils
instead of `@ethers…
…project/abi` (#985) Resolves MetaMask/metamask-extension#16567 Co-authored-by: Maarten Zuidhoorn <[email protected]>
- Loading branch information
Showing
6 changed files
with
325 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* eslint-disable */ | ||
const JSDOMEnvironment = require('jest-environment-jsdom'); | ||
|
||
// Custom test environment copied from https://github.com/jsdom/jsdom/issues/2524 | ||
// in order to add TextEncoder to jsdom. TextEncoder is expected by jose. | ||
|
||
module.exports = class CustomTestEnvironment extends JSDOMEnvironment { | ||
async setup() { | ||
await super.setup(); | ||
if (typeof this.global.TextEncoder === 'undefined') { | ||
const { TextEncoder, TextDecoder } = require('util'); | ||
this.global.TextEncoder = TextEncoder; | ||
this.global.TextDecoder = TextDecoder; | ||
this.global.ArrayBuffer = ArrayBuffer; | ||
this.global.Uint8Array = Uint8Array; | ||
} | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.