FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
interface/custom-test-env.js at main · balqaasem/interface · GitHub
balqaasem
/
interface
Public
forked from
Uniswap/interface
Notifications
You must be signed in to change notification settings
Fork
0
Star
1
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
interface
/
custom-test-env.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
16 lines (14 loc) · 580 Bytes
Breadcrumbs
interface
/
custom-test-env.js
Copy path
File metadata and controls
16 lines (14 loc) · 580 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Custom test environment to provide `TextEncoder`/`TextDecoder`
// eslint-disable-next-line @typescript-eslint/no-var-requires
const
Environment
=
require
(
'jest-environment-jsdom'
)
module
.
exports
=
class
CustomTestEnvironment
extends
Environment
{
async
setup
(
)
{
await
super
.
setup
(
)
if
(
typeof
this
.
global
.
TextEncoder
===
'undefined'
)
{
// eslint-disable-next-line @typescript-eslint/no-var-requires
const
{
TextEncoder
,
TextDecoder
}
=
require
(
'util'
)
this
.
global
.
TextEncoder
=
TextEncoder
this
.
global
.
TextDecoder
=
TextDecoder
}
}
}
Back
|
FazBrowse Home
|
New Git URL