Skip to content

Commit

Permalink
test(count): add test for counting over scalars
Browse files Browse the repository at this point in the history
  • Loading branch information
benlesh committed Oct 14, 2015
1 parent 559fd8a commit 86a9b45
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions perf/micro/immediate-scheduler/operators/count-scalar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
var RxOld = require('rx');
var RxNew = require('../../../../index');

module.exports = function (suite) {
var oldConcatWithImmediateScheduler = RxOld.Observable.just(25, RxOld.Scheduler.immediate).count();
var newConcatWithImmediateScheduler = RxNew.Observable.of(25).count();

function _next(x) { }
function _error(e) { }
function _complete() { }
return suite
.add('old count over scalar with immediate scheduler', function () {
oldConcatWithImmediateScheduler.subscribe(_next, _error, _complete);
})
.add('new count over scalar with immediate scheduler', function () {
newConcatWithImmediateScheduler.subscribe(_next, _error, _complete);
});
};

0 comments on commit 86a9b45

Please sign in to comment.