import popper.js
Signed-off-by: Nico Schottelius <nico@nico-notebook.schottelius.org>
This commit is contained in:
parent
615dc56d16
commit
16fb2bb919
241 changed files with 34099 additions and 0 deletions
|
|
@ -0,0 +1,31 @@
|
|||
import chai from 'chai';
|
||||
const { expect } = chai;
|
||||
import getStyleComputedProperty from '../../src/utils/getStyleComputedProperty';
|
||||
|
||||
describe('utils/getStyleComputedProperty', () => {
|
||||
let node;
|
||||
|
||||
beforeEach(() => {
|
||||
node = document.createElement('div');
|
||||
document.body.appendChild(node);
|
||||
node.style.position = 'relative';
|
||||
});
|
||||
|
||||
it('should return css properties', () => {
|
||||
expect(getStyleComputedProperty(node)).to.deep.equal(
|
||||
window.getComputedStyle(node, null)
|
||||
);
|
||||
});
|
||||
|
||||
it('should return one css property', () => {
|
||||
expect(getStyleComputedProperty(node, 'position')).to.equal('relative');
|
||||
});
|
||||
|
||||
it('should return an empty array from the shadowRoot', () => {
|
||||
let root;
|
||||
if (node.attachShadow) {
|
||||
root = node.attachShadow({ mode: 'open' });
|
||||
expect(getStyleComputedProperty(root)).to.deep.equal([]);
|
||||
}
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue