Creating tests is writing a code that runs against application code to ensure that the code meets its design and behaves as intended. Writing tests can save time by finding bugs at the early development stage.
Lets add our first test for the Todo
app:
In the
Todo/todo
folder, create a folder namedtests
. Inside it, create a file namedtodo_test.html
with following content:<!doctype html> <html> <head> <title>Todo List - tests</title> <meta charset="UTF-8" /> <link rel="stylesheet" href="../../funcunit/qunit/qunit.css" /> </head> <body> <h1 id="qunit-header">AutoSuggest Test Suite</h1> <h2 id="qunit-banner"></h2> <div id="qunit-testrunner-toolbar"></div> <h2 id="qunit-userAgent"></h2> <ol id="qunit-tests"></ol> <script src="../../steal/steal.js?todo/tests/todo_test.js"></script> </body> </html>
This...