-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into basic-validation
- Loading branch information
Showing
46 changed files
with
33,847 additions
and
13,825 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
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,26 @@ | ||
"use strict"; | ||
|
||
const { TextEncoder, TextDecoder } = require("util"); | ||
const { | ||
default: $JSDOMEnvironment, | ||
TestEnvironment, | ||
} = require("jest-environment-jsdom"); | ||
|
||
Object.defineProperty(exports, "__esModule", { | ||
value: true, | ||
}); | ||
|
||
// Using Jest 29, TextEncoder and TextDecoder do not have support, see https://github.com/jsdom/jsdom/issues/2524, | ||
// Solution was found here: https://github.com/jsdom/jsdom/issues/2524#issuecomment-1480930523 | ||
class JSDOMEnvironment extends $JSDOMEnvironment { | ||
constructor(...args) { | ||
const { global } = super(...args); | ||
if (!global.TextEncoder) global.TextEncoder = TextEncoder; | ||
if (!global.TextDecoder) global.TextDecoder = TextDecoder; | ||
if (!global.Uint8Array) global.Uint8Array = Uint8Array; | ||
} | ||
} | ||
|
||
exports.default = JSDOMEnvironment; | ||
exports.TestEnvironment = | ||
TestEnvironment === $JSDOMEnvironment ? JSDOMEnvironment : TestEnvironment; |
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.