Skip to content

Commit

Permalink
More cookies unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ahosgood committed Nov 15, 2023
1 parent a8ba53f commit e520e58
Show file tree
Hide file tree
Showing 5 changed files with 352 additions and 171 deletions.
6 changes: 4 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ module.exports = {
overrides: [
{
env: {
browser: true,
es2021: true,
node: true,
},
files: [".eslintrc.{js,cjs}"],
files: [".eslintrc.{js,cjs}", "**/*.test.js"],
parserOptions: {
sourceType: "script",
sourceType: "module",
},
},
],
Expand Down
206 changes: 41 additions & 165 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
"eslint-plugin-storybook": "^0.6.15",
"glob": "^10.3.10",
"jest-environment-jsdom": "^29.7.0",
"jsdom": "^22.1.0",
"mdx-mermaid": "^2.0.0",
"node-self": "^1.0.2",
"nunjucks": "^3.2.3",
Expand Down
2 changes: 2 additions & 0 deletions src/nationalarchives/lib/cookies.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export default class Cookies {
this.init();
}

/** @protected */
init() {
this.savePolicies({
...Object.fromEntries(
Expand All @@ -55,6 +56,7 @@ export default class Cookies {

destroy() {
Cookies._instance = null;
this.trigger("destroy");
}

get all() {
Expand Down
Loading

0 comments on commit e520e58

Please sign in to comment.