Skip to content

Commit 8d81e51

Browse files
michaelkhabarovhaoqunjiang
authored andcommitted
fix: set url option for jsdom-global (#3131)
This fixes `SecurityError: localStorage is not available for opaque origins` in mocha tests caused by jsdom (jsdom/jsdom#2304).
1 parent 056ba07 commit 8d81e51

File tree

1 file changed

+1
-1
lines changed
  • packages/@vue/cli-plugin-unit-mocha

1 file changed

+1
-1
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
require('jsdom-global')(undefined, { pretendToBeVisual: true })
1+
require('jsdom-global')(undefined, { pretendToBeVisual: true, url: 'http://localhost' })

0 commit comments

Comments
 (0)