time-to-botec

Benchmark sampling in different programming languages
Log | Files | Refs | README

commonjs-test.js (845B)


      1 var vows = require('vows');
      2 var assert = require('assert');
      3 var suite = vows.describe('jStat.commonjs');
      4 
      5 suite.addBatch({
      6   'jStat': {
      7     'topic': function() {
      8       return require('./../../dist/jstat.js');
      9     },
     10     'should be defined': function(jStat) {
     11       assert.equal(typeof jStat, 'function');
     12 
     13       // Check some random functions
     14       assert.equal(typeof jStat.rows, 'function');
     15       assert.equal(typeof jStat.min, 'function');
     16       assert.equal(typeof jStat.betafn, 'function');
     17       assert.equal(typeof jStat.beta.pdf, 'function');
     18       assert.equal(typeof jStat.add, 'function');
     19       assert.equal(typeof jStat.zscore, 'function');
     20     },
     21     'should export jStat object under the "jStat" property for compatibility reasons': function(jStat) {
     22       assert.equal(jStat.jStat, jStat);
     23     },
     24   }
     25 });
     26 
     27 suite.export(module);