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

path towards the mocha.css, mocha.js and chai.js in the test/index.html file are wrong #204

Open
AdrianCitu opened this issue Jan 24, 2018 · 0 comments

Comments

@AdrianCitu
Copy link

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.
In the generated files the paths are:

<script src="../bower_components/mocha/mocha.js"></script> <script src="../bower_components/chai/chai.js"></script>

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>
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