Skip to content

Commit

Permalink
[Tests] increase coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Oct 5, 2023
1 parent dc0f577 commit bbe8513
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions test/why.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,27 @@ test('nullish', function (t) {
t.equal('', isEqualWhy(undefined, undefined), 'present undefineds are equal');
t.equal('', isEqualWhy(null, null), 'nulls are equal');

/* globals document: false */
t.test('document.all', { skip: typeof document !== 'undefined' }, function (st) {
var all = typeof document !== 'undefined' && document.all;

st.equal(
isEqualWhy(all, null),
String(all) + ' !== null',
'document.all and null are not equal'
);

st.equal(
isEqualWhy(all, all),
'',
'document.all is equal to itself'
);

// TODO: get a new iframe's document.all and compare to this one's

st.end();
});

t.end();
});

Expand Down

0 comments on commit bbe8513

Please sign in to comment.