February 2019
Beginner
694 pages
18h 4m
English
The tests we have been running up until this stage have all been rather simple, and do not need to have an HTML page, or an active DOM. As soon as we start to run tests that require a DOM, we will need to inject our tests into a running browser in order for them to run correctly. Jasmine can easily be run in a browser by setting up an HTML page for running tests. Typically, this file will be named SpecRunner.html, as follows:
<html>
<head>
<link rel="stylesheet" type="text/css"
href="node_modules/jasmine-core/lib/jasmine-core/jasmine.css">
<script type="text/javascript"
src="node_modules/jquery/dist/jquery.js"></script>
<script type="text/javascript"
src="node_modules/jasmine-core/lib/jasmine-core/jasmine.js"> </script> <script ...Read now
Unlock full access