mmanela / chutzpah

Chutzpah is an open source JavaScript test runner which enables you to run unit tests using QUnit, Jasmine, Mocha and TypeScript.
http://mmanela.github.io/chutzpah/
Apache License 2.0
550 stars 143 forks source link

Problem testing js modules #810

Open fsalas opened 2 years ago

fsalas commented 2 years ago

First of all, great job with this integration and specially with new web server mode.

I'm having the following issue, and after struggling with it for some days I'm reporting it, I apologize if it is my fault, can certainly be.

I' using jasmine and have some js modules that I want to test, and after testing several configs, using .mjs instead of .js, etc, I didn't manage to get my tests detected in any of the menu options of chutzpah for execute the tests. When I use Open in browser, the page opens with 0 test, I check the page source, I can see my js with the tests in a normal script tag. If I modify the script tag and changes it with type="module" then the tests are run ok.

My chutzpah.json is a very simple one, I've played with it, with no avail

{ "Framework": "jasmine", "Server": { "Enabled": true, "DefaultPort": 9876, "RootPath": "../../" }, "BrowserArguments": { "chrome": "--allow-file-access-from-files --allow-file-access" }

}

Thanx in advance and great work