forked from forem/forem
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bump jest from 27.5.1 to 28.1.0 (forem#17612)
* Bump jest from 27.5.1 to 28.1.0 Bumps [jest](https://github.com/facebook/jest/tree/HEAD/packages/jest) from 27.5.1 to 28.1.0. - [Release notes](https://github.com/facebook/jest/releases) - [Changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md) - [Commits](https://github.com/facebook/jest/commits/v28.1.0/packages/jest) --- updated-dependencies: - dependency-name: jest dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * resolve upgrade errors Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Suzanne Aitchison <[email protected]>
- Loading branch information
1 parent
05fcdfc
commit c2af21e
Showing
4 changed files
with
440 additions
and
627 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,26 @@ | ||
/* eslint-env node */ | ||
// See https://github.com/jsdom/jsdom/issues/2524#issuecomment-736672511 | ||
const Environment = require('jest-environment-jsdom'); | ||
const Environment = require('jest-environment-jsdom').default; | ||
|
||
module.exports = class CustomTestEnvironment extends Environment { | ||
constructor(config, context) { | ||
super(config, context); | ||
} | ||
|
||
async setup() { | ||
await super.setup(); | ||
// See https://github.com/jsdom/jsdom/issues/2524#issuecomment-736672511 | ||
if (typeof this.global.TextEncoder === 'undefined') { | ||
const { TextEncoder, TextDecoder } = require('util'); | ||
this.global.TextEncoder = TextEncoder; | ||
this.global.TextDecoder = TextDecoder; | ||
} | ||
} | ||
|
||
async teardown() { | ||
await super.teardown(); | ||
} | ||
|
||
getVmContext() { | ||
return super.getVmContext(); | ||
} | ||
}; |
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.