Skip to content
Integration of Jasmine Spec framework with Appcelerator Titanium Mobile
JavaScript CoffeeScript Python
Latest commit 22c2ec5 Jul 28, 2011 @akahigeg fix nest spec include
Failed to load latest commit information.
config Initial commit Feb 17, 2011
jasmine @ 127fe04 add submodule jasmine 1.0.1-release Jul 27, 2011
lib
script
src
.gitignore add .gitignore Feb 17, 2011
.gitmodules add submodule jasmine 1.0.1-release Jul 26, 2011
LICENSE
README.ja.markdown change default reporter to "console". ("html" is experimental) Jul 27, 2011
README.markdown change default reporter to "console". ("html" is experimental) Jul 27, 2011

README.markdown

Jamine Titanium

This brings JavaScript BDD framework Pivotal Lab's Jasmine to Titamium Mobile.

Getting Started

Make directories and get Jasmine Titanium

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 code

  • Writing specs in spec dir.
  • Writing application code in lib dir.

See Jasmine Wiki for more details.

Run specs

jasmine-titanium/script/specs.py

Requirements

  • Mac OSX
  • iOS SDK
  • Android SDK (experimental)
  • Titanium Mobile 1.7.2 or later

Tips

specs.py options

-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]

make symbolic link for specs.py in Resource dir

# in Resources/
ln -s vendor/jasmine-titanium/script/specs.py specs.py
./specs.py

save typing.

filtering noisy log

./specs.py |grep Jasmine:

change lib and spec dir

Edit vendor/jasmine-titanium/config/runner-config.js

Something went wrong with that request. Please try again.