Browse Source

Use tape's throws where appropriate

pull/385/head
Julian Simioni 9 years ago
parent
commit
87f6f32985
  1. 11
      test/unit/helper/types.js

11
test/unit/helper/types.js

@ -4,16 +4,13 @@ module.exports.tests = {};
module.exports.tests.no_cleaned_types = function(test, common) { module.exports.tests.no_cleaned_types = function(test, common) {
test('no cleaned types', function(t) { test('no cleaned types', function(t) {
try { function testIt() {
types({}); types({});
t.fail('exception should be thrown');
} }
catch (err) {
t.equal(err.message, 'clean_types should not be null or undefined', 'no input should result in exception'); t.throws(testIt, /clean_types should not be null or undefined/, 'no input should result in exception');
}
finally {
t.end(); t.end();
}
}); });
}; };

Loading…
Cancel
Save