Skip to content

Jest tests fail - SecurityError: localStorage is not available for opaque origins #1424

Open
@bigtunacan

Description

@bigtunacan

To reproduce just generate a new project using vue init webpack my-project and choose Jest as the test suite. Then run npm run unit and it will fail with error

SecurityError: localStorage is not available for opaque origins
at Window.get localStorage [as localStorage]
(node_modules/jsdom/lib/jsdom/browser/Window.js:257:15)
at Array.forEach ()

This appears related to this issue with jsdom jsdom/jsdom#2304

For now there is a workaround by locking jsdom to version 11.11.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions