test/common/create-fake-element.js
raw| 1 | import createFakeElement from '../../src/common/create-fake-element'; |
| 2 | |
| 3 | describe('createFakeElement', () => { |
| 4 | it('should define a fake element and set the position right style property', (done) => { |
| 5 | // Set document direction |
| 6 | document.documentElement.setAttribute('dir', 'rtl'); |
| 7 | |
| 8 | const el = createFakeElement(document.body); |
| 9 | |
| 10 | assert.equal(el.style.right, '-9999px'); |
| 11 | done(); |
| 12 | }); |
| 13 | }); |