Skip to content
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.

Commit

Permalink
Fix Benchmark.js test fails.
Browse files Browse the repository at this point in the history
  • Loading branch information
jdalton committed Jan 28, 2016
1 parent d554f47 commit 0c7323f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion benchmark.js
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,7 @@
if (callback === 'successful') {
// Callback to exclude those that are errored, unrun, or have hz of Infinity.
callback = function(bench) {
return bench.cycles && _.isFinite(bench.hz);
return bench.cycles && _.isFinite(bench.hz) && !bench.error;
};
}
else if (callback === 'fastest' || callback === 'slowest') {
Expand Down
4 changes: 3 additions & 1 deletion test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1090,7 +1090,9 @@
suite = Benchmark.Suite();

suite.add('a', function() {
count++;
for (var i = 0; i < 1e5; i++) {
count++;
}
})
.add('b', function() {
for (var i = 0; i < 1e6; i++) {
Expand Down

0 comments on commit 0c7323f

Please sign in to comment.