Skip to content

Commit

Permalink
matchMedia : new test for 'addListener'
Browse files Browse the repository at this point in the history
  • Loading branch information
romainmenke authored and JakeChampion committed Apr 20, 2020
1 parent 925f1b4 commit 98e34bf
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions polyfills/matchMedia/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,13 @@ it('https://github.com/Financial-Times/polyfill-library/issues/43', function() {
window.matchMedia('(min--moz-device-pixel-ratio: 2)');
});
});

it('https://github.com/Financial-Times/polyfill-library/issues/623', function() {
// addEventListener should not throw
proclaim.doesNotThrow(function() {
var mql = window.matchMedia('screen');
mql.addListener(function() {
// noop
});
});
});

0 comments on commit 98e34bf

Please sign in to comment.