Java Reference
In-Depth Information
<!-- include spec files here... -->
<script type="text/javascript" src="spec/
Now, since we're doing TDD, we need to start writing the tests. Open up numberSpec.js
and add the following code:
spec/numberSpec.js (incomplete)
describe("The factorsOf() function", function() {
it("should find the factors of 12", function() {
This is one description and one spec that says our factorsOf() function should return
an array containing the factors of 12 when 12 is provided as an argument. Let's run the test
now by opening SpecRunner.html in a browser. It should look similar to the screenshot in
Figure 10.2 .
Search WWH ::

Custom Search