Skip to content

Commit

Permalink
Incorporate missing bug fix and bump dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Planeshifter committed Apr 2, 2020
1 parent f1784d1 commit 28afe22
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
count[ val ] += 1;
if ( count[ val ] === max ) {
vals.push( val );
} else {
} else if ( count[ val ] > max ) {
max = count[ val ];
vals = [ val ];
}
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
},
"dependencies": {},
"devDependencies": {
"chai": "1.x.x",
"mocha": "1.x.x",
"chai": "2.x.x",
"mocha": "2.x.x",
"coveralls": "^2.11.1",
"istanbul": "^0.3.0"
},
Expand Down
5 changes: 4 additions & 1 deletion test/test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use strict';

// MODULES //

Expand All @@ -17,7 +18,6 @@ var expect = chai.expect,
// TESTS //

describe( 'compute-mode', function tests() {
'use strict';

it( 'should export a function', function test() {
expect( mode ).to.be.a( 'function' );
Expand Down Expand Up @@ -53,6 +53,9 @@ describe( 'compute-mode', function tests() {

data = [ 2, 4, 5, 3, 8, 4, 2 ];
assert.deepEqual( mode( data ), [ 2, 4 ] );

data = [ 2, 2, 4 ];
assert.deepEqual( mode( data ), [ 2 ] );
});

});

0 comments on commit 28afe22

Please sign in to comment.