Commit 75902f23 authored by Paolo Greppi's avatar Paolo Greppi
Browse files

fix failing test

TypeError [ERR_AMBIGUOUS_ARGUMENT]: The "error/message" argument is ambiguous.
The error message "Expected the `default` option to be of type `boolean`, got `number`" is identical to the message
parent 3cb5fdd0
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -84,7 +84,7 @@ Index: node-yn/test.js
-test('default option throws error if not a boolean type', t => {
-	t.throws(() => yn('10', {default: 10}), 'Expected the `default` option to be of type `boolean`, got `number`');
+test('default option throws error if not a boolean type', function() {
+	assert.throws(function() { yn('10', {default: 10}) }, 'Expected the `default` option to be of type `boolean`, got `number`');
+	assert.throws(function() { yn('10', {default: 10}) }, TypeError, 'Expected the `default` option to be of type `boolean`, got `number`');
 });

-test('default option', t => {