Skip to content

Commit

Permalink
Add a test case for non-number width
Browse files Browse the repository at this point in the history
  • Loading branch information
icyflame committed Nov 20, 2021
1 parent 6530787 commit 75dfa0d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/bar-horizontal.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ describe( 'argument checking', function () {
return barHorizontal( [ 1,2,3 ], WIDTH_BASE );
} );
} );

it( 'Should use width 80 when given width is not a number', function() {
assert.doesNotThrow( function() {
return barHorizontal( [ 1,2,3 ], { width: 'not a number', noPrint } );
} );
} );
});

describe( 'labels option', function () {
Expand Down

0 comments on commit 75dfa0d

Please sign in to comment.