-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Mostly based on changes made in the original NHS app: nhsuk/cookie-consent@ed071c0
- Loading branch information
1 parent
1b6af4f
commit 65cabfd
Showing
10 changed files
with
15,485 additions
and
29,389 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,13 +1,14 @@ | ||
const JSDOMEnvironment = require('jest-environment-jsdom'); | ||
import JSDOMEnvironment from 'jest-environment-jsdom'; | ||
|
||
module.exports = class CookieTestEnvironment extends JSDOMEnvironment { | ||
constructor(config) { | ||
super(config); | ||
export default class CookieTestEnvironment extends JSDOMEnvironment { | ||
constructor(config, options) { | ||
super(config, options); | ||
this.global.jsdom = this.dom; | ||
this.global.cookieJar = this.dom.cookieJar; | ||
} | ||
|
||
teardown() { | ||
this.global.jsdom = null; | ||
return super.teardown(); | ||
} | ||
}; | ||
} |
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.