This brings JavaScript BDD framework Pivotal Lab's Jasmine to Titamium Mobile.
cd Resources
mkdir spec lib vendor
cd vendor
git clone https://github.com/akahigeg/jasmine-titanium.git
cd jasmine-titanium
git submodule init
git submodule update
Using jasmine 1.0.1-release.
- Writing specs in spec dir.
- Writing application code in lib dir.
See Jasmine Wiki for more details.
jasmine-titanium/script/specs.py
- Mac OSX
- iOS SDK
- Android SDK (experimental)
- Titanium Mobile 1.7.2 or later
-v show list of spec descriptions.
-s CLASSNAME run specs for specified class only.
ex. -s bookmark #=> bookmark_spec.js
-o FILE Write output to a file instead of STDOUT.
-p PLATFORM, --platform=PLATFORM
android or iphone. [default: iphone]
--android-sdk=ANDROID_SDK_PATH
specify android sdk path.
-r REPORTER, --reporter=REPORTER
display result to html or console. (html only for android) [defulat: console]
# in Resources/
ln -s vendor/jasmine-titanium/script/specs.py specs.py
./specs.py
save typing.
./specs.py |grep Jasmine:
Edit vendor/jasmine-titanium/config/runner-config.js