time-to-botec

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

rand-test.js (451B)


      1 var vows = require('vows');
      2 var assert = require('assert');
      3 var suite = vows.describe('jStat.rand');
      4 
      5 require('../env.js');
      6 
      7 suite.addBatch({
      8   'rand': {
      9     'topic': function() {
     10       return jStat;
     11     },
     12     'return rand': function(jStat) {
     13       assert.isTrue(jStat.rand(2) instanceof Array);
     14     },
     15     'rand from empty jStat object': function (jStat) {
     16       assert.isTrue(jStat().rand(2) instanceof jStat);
     17     }
     18   }
     19 });
     20 
     21 suite.export(module);