Skip to content
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

Documentation Update? Uncaught SecurityError: localStorage is not available for opaque origins #36

Open
honzie opened this issue Mar 26, 2019 · 0 comments

Comments

@honzie
Copy link

honzie commented Mar 26, 2019

I'm attempting to use mocha-jsdom with the instructions per https://www.npmjs.com/package/mocha-jsdom. However, I'm receiving an error from JSDOM that appears similar to what was commented in at jsdom/jsdom#2304.

I see this in a fresh install, with the following test:

const jsdom = require('mocha-jsdom');

describe('mocha tests', function () {
  jsdom();
 
  it('works', function () {});

A test repo, with only mocha and mocha-jsdom and chai is available at https://github.com/honzie/jsdom-mocha-error/blob/master/test/test-test.js.

Updating the jsdom() invocation with a non-about:blank (JSDOM default) URL works. Example:

  jsdom({
    url: 'https://example.org/',
  });

I'm wondering if the documentation should be changed accordingly, or if a default URL should be used in the library. If you'd like either of these changes made in a fork and a PR opened, please let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant