Starter for Ten: JavaScript Unit Testing - msatkinson/ethereum GitHub Wiki
#Work In Progress Links and rough notes as I explore JavaScript Unit Testing approaches and frameworks. Initially focused on testing within the Meteor framework in support of the associated projects
##Meteor Testing
- The Official Guide (1.3)
meteor test
Lazy load everything apart from test files, use the test files to selectively import behaviour under test
Provides pluggable driver package support
Mocha is recommended
####TinyTest for Meteor packages
####Spacejam
- Package testing to the command line console with spacejam
- Example:
spacejam test-packages model
Note: use the package name, not the package path
####practicalmeteor:mocha
"Write package tests with mocha and run them in the browser or from the command line with spacejam."
- Unable to get mocha to test my package. The following command line was used:
./node_modules/spacejam/bin/spacejam test-packages --driver-package=practicalmeteor:mocha-console-runner model
###Meteor Configuration
package.js
v'spackage.json
package.json
nodejs
npm
configurationpackage.js
meteor package configuration, refer to:
meteor create
###Meteor Testing using Jasmine
- https://github.com/xolvio/meteor-jasmine
- Documentation
- http://www.webtempest.com/meteor-js-testing
provides a useful source code structure for jasmine testing
####Meteor Test Driven Development using Larka
and phantomjs(http://www.sitepoint.com/test-driven-development-with-meteor/)
- I appreciated the link to a discussion on the 'official' Meteor testing framework