Skip to content

Commit

Permalink
remove redundant tests in test/throws.js (assertion unchanged! Passes…
Browse files Browse the repository at this point in the history
  • Loading branch information
nelsonic committed Aug 28, 2016
1 parent 27ce042 commit 4b52e9a
Showing 1 changed file with 2 additions and 22 deletions.
24 changes: 2 additions & 22 deletions test/throws.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,8 @@ function getNonFunctionMessage(fn) {
}
}

tape('throws', function (t) {
t.throws(fn);
t.end();
});

tape('throws (RegExp match)', function (t) {
t.throws(fn, /RegExp/, 'regex with no anchors');
t.throws(fn, /^TypeError: Reg/, 'regex with starting anchor');
t.throws(fn, /RegExp$/, 'regex with ending anchor');
t.throws(fn, /^TypeError: RegExp$/, 'regex with both anchors');
t.end();
});

tape('throws (Function match)', function (t) {
t.throws(fn, TypeError);
t.end();
});

tap.test('failures', function (tt) {
// tt.plan(1);
tt.plan(1);

var test = tape.createHarness();
test.createStream().pipe(concat(function (body) {
Expand Down Expand Up @@ -117,7 +99,6 @@ tap.test('failures', function (tt) {
+ '# pass 0\n'
+ '# fail 9\n'
);
tt.end();
}));

test('non functions', function (t) {
Expand All @@ -136,5 +117,4 @@ tap.test('failures', function (tt) {
t.plan(1);
t.throws(function () {});
});

});
});

0 comments on commit 4b52e9a

Please sign in to comment.