I have followed the directions at
http://pivotal.github.com/jasmine-webos/guide.html,
so the following files have been added to my project:
plugins
plugins/jasmine-webos
plugins/jasmine-webos/app
plugins/jasmine-webos/app/lib
plugins/jasmine-webos/app/lib/jasmine-webos.js
plugins/jasmine-webos/app/lib/jasmine.js
plugins/jasmine-webos/app/views
plugins/jasmine-webos/app/views/error
plugins/jasmine-webos/app/views/error/error-scene.html
plugins/jasmine-webos/app/views/error/expectation.html
plugins/jasmine-webos/app/views/error/spec-result.html
plugins/jasmine-webos/app/views/test
plugins/jasmine-webos/app/views/test/spec-list.html
plugins/jasmine-webos/app/views/test/spec.html
plugins/jasmine-webos/app/views/test/test-scene.html
plugins/jasmine-webos/images
plugins/jasmine-webos/images/jasmine_logo.png
plugins/jasmine-webos/images/pill-failing.png
plugins/jasmine-webos/images/pill-passing.png
plugins/jasmine-webos/sources.json
plugins/jasmine-webos/stylesheets
plugins/jasmine-webos/stylesheets/jasmine-webos.css
spec
spec/javascripts
spec/javascripts/common-spec.js
common-spec.js contains just:
it('should increment a variable', function () {
var foo = 0;
foo++;
});
The following lines have been added to my sources.json:
{ "source": "plugins/jasmine-webos/app/lib/jasmine.js"},
{ "source": "plugins/jasmine-webos/app/lib/jasmine-webos.js"},
{ "source": "spec/javascripts/common-spec.js"}
But when I run the app normally from Eclipse, I get the following
error messages in the log:
[20100810-01:29:36.579378] error: Uncaught Error: jasmine.Suite()
required, plugins/jasmine-webos/app/lib/jasmine.js:1,825
[20100810-01:29:36.581631] error: =============> Jasmine webOS:
Constructing Proxy App Assistant, plugins/jasmine-webos/app/lib/
jasmine-webos.js:79
When I run the app using the command
palm-launch -p '{"runTests": true}' com.outlinetracker.outlinetracker
I get the following errors:
[20100810-01:31:15.263404] error: Uncaught Error: jasmine.Suite()
required, plugins/jasmine-webos/app/lib/jasmine.js:1,825
[20100810-01:31:15.265832] error: =============> Jasmine webOS:
Constructing Proxy App Assistant, plugins/jasmine-webos/app/lib/
jasmine-webos.js:79
[20100810-01:31:15.266953] info: ====> Jasmine webOS: prepping to run
specs
[20100810-01:31:15.267584] error: Uncaught TypeError: Cannot call
method 'spyOn' of null, plugins/jasmine-webos/app/lib/jasmine.js:439
When I set a breakpoint at jasmine.js line 1825, the stack trace looks
like:
Frames #0 to #3 of 4
#00 new [anonymous](env=#<an Object>, suite=null, description=should
increment a variable)
file:///media/cryptofs/apps/usr/palm/applications/com.outlinetracker.outlinetracker/plugins/jasmine-webos/app/lib/jasmine.js
line 1825 column 5 (position 47482)
#01 #<an Object>.it(description=should increment a variable,
func=function () {
var foo = 0;
foo++;
}) file:///media/cryptofs/apps/usr/palm/applications/com.outlinetracker.outlinetracker/plugins/jasmine-webos/app/lib/jasmine.js
line 795 column 14 (position 20048)
#02 it(desc=should increment a variable, func=function () {
var foo = 0;
foo++;
}) file:///media/cryptofs/apps/usr/palm/applications/com.outlinetracker.outlinetracker/plugins/jasmine-webos/app/lib/jasmine.js
line 456 column 27 (position 11494)
#03 [anonymous]()
file:///media/cryptofs/apps/usr/palm/applications/com.outlinetracker.outlinetracker/spec/javascripts/common-spec.js
line 1 column 1 (position 1)