mirror of
https://github.com/zenorocha/clipboard.js.git
synced 2023-08-10 21:12:48 +03:00

* Isolate cut, copy and core helper functions. * Update tests to accommodate new proposal * Add/update tests * Add tests to static copy/cut methods * Update condition syntax based on PR reviews * Migrate clipboard-action-default to functional approach. Update tests. Add tests * Improve folder structure. Clean up code. * Add types. Fix tsd check env. Improve in-code doc comments * Improve in-code doc comments
14 lines
405 B
JavaScript
14 lines
405 B
JavaScript
import createFakeElement from '../../src/common/create-fake-element';
|
|
|
|
describe('createFakeElement', () => {
|
|
it('should define a fake element and set the position right style property', (done) => {
|
|
// Set document direction
|
|
document.documentElement.setAttribute('dir', 'rtl');
|
|
|
|
const el = createFakeElement(document.body);
|
|
|
|
assert.equal(el.style.right, '-9999px');
|
|
done();
|
|
});
|
|
});
|