Skip to content

Commit

Permalink
[Tests] add more test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Dec 26, 2017
1 parent a77008f commit 30ebe4e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .nycrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"instrumentation": false,
"sourceMap": false,
"reporter": "html",
"lines": 96,
"lines": 95.95,
"statements": 95,
"functions": 96,
"branches": 92,
Expand Down
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,4 +182,3 @@ matrix:
allow_failures:
- os: osx
- env: TEST=true ALLOW_FAILURE=true
- env: COVERAGE=true
10 changes: 10 additions & 0 deletions test/fn.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,13 @@ test('function name', function (t) {
var obj = [ 1, 2, f, 4 ];
t.equal(inspect(obj), '[ 1, 2, [Function: xxx], 4 ]');
});

test('anon function', function (t) {
var f = (function () {
return function () {};
}());
var obj = [ 1, 2, f, 4 ];
t.equal(inspect(obj), '[ 1, 2, [Function], 4 ]');

t.end();
});

0 comments on commit 30ebe4e

Please sign in to comment.