The "Functional testing with a tabs widget” section shows you what
a sample test runner file looks like. You’ll need to have an HTML file
like that one to run tests in your browser; note how it contains
references to jQuery/QUnit/FuncUnit script files, and then runs a
testing script (the last script reference).
It sounds like you haven’t written unit tests either, so if you
need a guideline on where to put tests, make a “test” folder and write
all your test scripts in files under that folder. If you’re working
on a site that has a build process, you should exclude the test folder
when building to deploy to production.
Then you just need to add script references to all the files in
your test folder in your runner HTML file.
If you’re using StealJS (or any other AMD) along with FuncUnit,
you can add a script reference to it in your runner and make your
tests into a module.
The way FuncUnit works is that it launches a new browser window
with your full site and automates the interactions with the site from
the page running FuncUnit. This is why you need a separate HTML file
(for running FuncUnit) and don’t need to add anything to your existing
Leave a comment on air_hadoken's reply
Change topic type
Link this topic
Provide the permalink of a topic that is related to this topic