| 1 |
/** |
| 2 |
* @license |
| 3 |
* Copyright 2022 Google LLC |
| 4 |
* SPDX-License-Identifier: BSD-3-Clause |
| 5 |
*/ |
| 6 |
|
| 7 |
import {ignoreBenignErrors} from '../../helpers.js'; |
| 8 |
import {expect} from '@open-wc/testing'; |
| 9 |
|
| 10 |
import {testBehavior} from './test-behavior.js'; |
| 11 |
|
| 12 |
describe('ResizeObserver polyfill and loader should work', () => { |
| 13 |
ignoreBenignErrors(beforeEach, afterEach); |
| 14 |
|
| 15 |
it('should use native ResizeObserver when available', async () => { |
| 16 |
const {loadPolyfillIfNeeded} = await import( |
| 17 |
'../../../polyfillLoaders/ResizeObserver.js' |
| 18 |
); |
| 19 |
const RO = await loadPolyfillIfNeeded(); |
| 20 |
expect(RO).to.equal(window.ResizeObserver); |
| 21 |
testBehavior(); |
| 22 |
}); |
| 23 |
}); |