什么是ti-mocha，Simple and reliable support for mocha testing with Appcelerator's Titanium SDK
cd /path/to/Titanium/project && npm install ti-mocha --prefix ./node_modules
- Install node.js.
- Install grunt:
[sudo] npm install -g grunt-cli
git clone https://github.com/tonylukasavage/ti-mocha.git && cd ti-mocha && npm install
This process will generate a new
./ti-mocha.jsfile based on the files in
src, as well as the source mocha.js file found at
./node_modules/mocha/mocha.jsafter you execute
npm install. See lib/build.jsfor details of the build process. Please note that nomodifications are made directly to the source mocha.js file.
- Change version of mocha in the package.json
Please report issues, new features/reporters, or requests in this repo's issue tracker. Bear in mind that this is a straight-up, minimal porting effort to make mocha work with Titanium. If you want additional features or functionality in mocha itself, please report them in the mocharepository.
Distributed under MIT License.