New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jsdom v11.12.0 adds localStorage and sessionStorage #80

Merged
merged 16 commits into from Oct 12, 2018

Conversation

7 participants
@geoffdutton
Contributor

geoffdutton commented Aug 2, 2018

In version 11.12.0, jsdom added localStorage and sessionStorage, so simply overwriting global.localStorage and global.sessionStorage doesn't work.

More on the issue here: jsdom/jsdom#2304

This is my hacky fix, not sure if there is a better way.

This is also only an issue when using --env=jsdom for jest.

geoffdutton added some commits Aug 2, 2018

clarkbw added some commits Aug 30, 2018

Greenkeeper/rollup plugin babel 4.0.2 (#85)
* chore(package): update rollup-plugin-babel to version 4.0.2

Closes #84

* chore(package): update lockfile

https://npm.im/greenkeeper-lockfile
Greenkeeper/eslint config prettier 3.0.1 (#87)
* chore(package): update eslint-config-prettier to version 3.0.1

Closes #82

* chore(package): update lockfile

https://npm.im/greenkeeper-lockfile
Greenkeeper/rollup 0.65.0 (#86)
* chore(package): update rollup to version 0.65.0

Closes #79

* chore(package): update lockfile

https://npm.im/greenkeeper-lockfile

@clarkbw clarkbw referenced this pull request Sep 7, 2018

Closed

Error on latest version on Jest (23.5.0) #88

3 of 3 tasks complete
Update rollup to the latest version 🚀 (#89)
* chore(package): update rollup to version 0.66.0

* chore(package): update lockfile yarn.lock
@Kocal

This comment has been minimized.

Kocal commented Sep 20, 2018

Any updates on this? 🤔

@adieCodes

This comment has been minimized.

adieCodes commented Sep 25, 2018

Would be great to get this merged, I can't seem to get any of the workarounds to work. Thanks in advance for all your work 👍

@cscleison

This comment has been minimized.

cscleison commented Oct 1, 2018

it seems to be working. can we merge this?

@AlexandrLi

This comment has been minimized.

AlexandrLi commented Oct 5, 2018

Guys, any updates on this?

geoffdutton added some commits Aug 2, 2018

Merge branch 'jsdom-v11.12-fix' of github.com:geoffdutton/jest-locals…
…torage-mock into jsdom-v11.12-fix

* 'jsdom-v11.12-fix' of github.com:geoffdutton/jest-localstorage-mock:
  build it
  only overwrite _localStorage and _sessionStorage if they exist
  use object defineProperty on _localStorage and _sessionStorage
  add testURL to get rid of security error
  using --env=jsdom, can't overwrite localStorage
@geoffdutton

This comment has been minimized.

Contributor

geoffdutton commented Oct 10, 2018

I fixed the conflicts with yarn.lock.

@clarkbw

I can't seem to get Circle to work anymore but this looks good and passes tests locally. 👍

@clarkbw clarkbw merged commit 5e26c0f into clarkbw:master Oct 12, 2018

@th3fallen

This comment has been minimized.

th3fallen commented Oct 16, 2018

@clarkbw could you tag this so we could consume it via yarn please sir?

@clarkbw

This comment has been minimized.

Owner

clarkbw commented Oct 22, 2018

@th3fallen Release coming in #92

There were build errors that didn't allow me to publish

@Kocal

This comment has been minimized.

Kocal commented Oct 23, 2018

Thanks you @clarkbw! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment