Browse Source

Remove t.doesNotThrow - fixes #850 (#1001)

hoisting-throws-helper
platy11 8 years ago
committed by Sindre Sorhus
parent
commit
e4487986cd
  1. 1
      lib/assert.js
  2. 18
      test/assert.js

1
lib/assert.js

@ -154,7 +154,6 @@ x.ifError = function (err, msg) {
/*
* deprecated APIs
*/
x.doesNotThrow = util.deprecate(x.notThrows, getDeprecationNotice('doesNotThrow()', 'notThrows()'));
x.ok = util.deprecate(x.truthy, getDeprecationNotice('ok()', 'truthy()'));
x.notOk = util.deprecate(x.falsy, getDeprecationNotice('notOk()', 'falsy()'));
x.same = util.deprecate(x.deepEqual, getDeprecationNotice('same()', 'deepEqual()'));

18
test/assert.js

@ -359,24 +359,6 @@ test('.notThrows()', function (t) {
t.end();
});
test('.doesNotThrow() alias for .notThrows()', function (t) {
process.noDeprecation = true;
t.doesNotThrow(function () {
assert.doesNotThrow(function () {});
});
t.throws(function () {
assert.doesNotThrow(function () {
throw new Error('foo');
});
});
process.noDeprecation = false;
t.end();
});
test('.regex()', function (t) {
t.doesNotThrow(function () {
assert.regex('abc', /^abc$/);

Loading…
Cancel
Save