We have a set of Jasmine tests that run successfully in the local web server. http-server.
We would like to run these tests from the command line during the TeamCity build process without having to start a webserver.
Opening the html file with chrome using --disable-web-security flag results in
Failed to load module script: The server responded with a non-JavaScript MIME type of "". Strict MIME type checking is enforced for module scripts per HTML spec.
Probably because script references with type="module" in the SpecRunner.html file
<script src="../src/js/App/app.js" type="module"></script>
Jasmine tests are coupled to DOM/jQuery so that they need to be run in a browser. The SpecRunner html page includes script references with type="module".
How can we run these tests during a TeamCity build and fail the build if there are any test failures?
Thanks.