You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Generate an extension and use mocha as the testing framework.
Open the index.html file using the browser.
You will have an empty screen but if you look the browser console you will see a few errors:
Loading failed for the <script> with source “file:///home/ady/DexterLab/securityHeadersBrowserExtension/chrome/bower_components/mocha/mocha.js”.
and
Loading failed for the <script> with source “file:///home/ady/DexterLab/securityHeadersBrowserExtension/chrome/bower_components/chai/chai.js”.
Possible root cause:
I think this is due to the fact that the path towards the mocha.css, mocha.js and chai.js are not good.
In the generated files the paths are:
How to generate the problem:
Generate an extension and use mocha as the testing framework.
Open the index.html file using the browser.
You will have an empty screen but if you look the browser console you will see a few errors:
Loading failed for the <script> with source “file:///home/ady/DexterLab/securityHeadersBrowserExtension/chrome/bower_components/mocha/mocha.js”.
and
Loading failed for the <script> with source “file:///home/ady/DexterLab/securityHeadersBrowserExtension/chrome/bower_components/chai/chai.js”.
Possible root cause:
I think this is due to the fact that the path towards the mocha.css, mocha.js and chai.js are not good.
<script src="../bower_components/mocha/mocha.js"></script> <script src="../bower_components/chai/chai.js"></script>In the generated files the paths are:
Possible fix:
I fixed the problem by changing the paths:
<script src="../node_modules/mocha/mocha.js"></script> <script src="../node_modules/chai/chai.js"></script>The text was updated successfully, but these errors were encountered: