Through the given 'ctor' params data, the Tabcorp set of calculation rules, to return the results of each produce. These data can be collected via the 'stdin', or you can custom the test data, and quickly see the results via the 'stdout'.
1. `$ npm install` install 'Tabcorp' dependent package
2. `cp config.js` modify configuration file
3. `$ npm test` make sure tesing
4. `$ node betting.js/npm start`
Tesing
$ npm test
$ mocha test
$ grunt mochaTest
js-coverage
$ mocha --require blanket -R html-cov > coverage.html
the file coverage.html to show results
debugger
$ npm install -g node-inspector
$ node --debug betting.js / node --debug-brk betting.js
$ node-inspcetor
using travis-ci require to configure via github
var obj = Event();
obj.listen('xx',function(data){
//data
});
obj.one('xx',function(data){
//data
});
obj.remove('xx');
obj.trigger('xx','');
var tc = new Tabcorp(arrData);
var rtnData = tc.generateWin();
tc.generateWin(function (data) {
//
});
var rtnData = tc.generateExacta();
tc.generateExacta(function (data) {
//
});
var rtnData = tc.generatePlace();
tc.generatePlace(function (data) {
//
});
.
the exception in api do not capture, so if use inappropriate data ,it may cause unexpected output exception.
MIT