hbenl / vscode-mocha-test-adapter

Mocha Test Adapter for the VS Code Test Explorer
MIT License
91 stars 31 forks source link

Error on load tests : localStorage is not defined #109

Open Hydrog3n opened 4 years ago

Hydrog3n commented 4 years ago

Hello, First, thank for your extension. :)

I just show I have an error only in my IDE because in the command line it seems to not have trouble. I use VSCodium.

I try to found in my project localStorage but it's a node app so I don't know why I will have this.

I really don't know if it's in your extension or in a module you use. If it's not yours, I will open an issue on the concerned repo.

Extension version: 2.4.0 VSCodium version: 1.45.0

Let me know if you need more information.

ReferenceError: localStorage is not defined
    at Object.<anonymous> (<pathtomyproject>/node_modules/readable-web-to-node-stream/lib/index.spec.js:3:1)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at <pathtomyproject>/node_modules/mocha/lib/mocha.js:250:27
    at Array.forEach (<anonymous>)
    at Mocha.loadFiles (<pathtomyproject>/node_modules/mocha/lib/mocha.js:247:14)
    at Mocha.run (<pathtomyproject>/node_modules/mocha/lib/mocha.js:576:10)
    at /home/loic/.vscode-oss/extensions/hbenl.vscode-mocha-test-adapter-2.4.0/out/worker/bundle.js:5646:23
    at Generator.next (<anonymous>)
    at /home/loic/.vscode-oss/extensions/hbenl.vscode-mocha-test-adapter-2.4.0/out/worker/bundle.js:88:71
    at new Promise (<anonymous>)
hbenl commented 4 years ago

Is the project where this is happening public? If so, I'd like to try to figure this out.

Hydrog3n commented 4 years ago

It is not public, but it's happening on different privates projects. I will try to found one public with the trouble