Here are more detailed instructions on how to get Jasmine webOS into your Palm® webOS™ application.
plugins/jasmine-webos directoryjasmine.js into plugins/jasmine-webos/app/libsources.json file, preferably after all of your application code. Order is important: jasmine.js must be before jasmine-webos.js{ "source": "plugins/jasmine-webos/app/lib/jasmine.js"},
{ "source": "plugins/jasmine-webos/app/lib/jasmine-webos.js"}
Now that you can run specs, you need to write some. Here's how.
spec directory in the root of your applicationspec that mirrors your application code. For example, spec/app/assistants, spec/app/models, etc.app you should have a corresponding file in spec/app. So if you have a file that handles foo in app/models/foo.js, your spec file should be spec/models/foo-spec.jssources.json after the Jasmine files. To extend the example from above:{ "source": "plugins/jasmine-webos/app/lib/jasmine.js"},
{ "source": "plugins/jasmine-webos/app/lib/jasmine-webos.js"},
{ "source": "spec/models/foo-spec.js"}
For any code that does not make any Palm Mojo API calls, writing your specs is straightforward. Write your specs according to the Jasmine User's Guide. The Sample Application (coming soon) has examples.
Any code that is dependent on Mojo has some limitations. You can test Scene Assistants, but with a few key limitations. Jasmine webOS includes a Fake Mojo Depot for testing interactions with storage and a Mock Ajax implementation for testing making calls to remote servers.
You can find examples of each in the Sample Application (coming soon).
sources.jsonAll of your spec files need to be added to sources.json after the Jasmine files (see the example above). If these entries are not in sources.json then Jasmine will not know about your specs and thus won't be able to run them.
palm-launch -p '{"runTests": true}'
Your app will come up and you should see Jasmine output like this:

A progress bar, Jasmine version information, and the expectation results. If all your specs pass, the bar will be green.
If any spec fails, the bar will be red and the failed specs will be listed, like this:

You can tap on any failed spec to see a list of all it's failing expectations, numbered, like this:

At any time you can tap the 'All Results' button to see the results of all specs, passing and failing.

The Jasmine webOS plugin, Jasmine, and your spec files should not be included in your application when submitted to Palm for distribution. While this code will not affect your application, it does increase the package size and the time it takes the app to load.
Remove these files from sources.json and exclude your spec directory when packaging. See Palm's SDK documentation for how to do this.