mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-18 17:05:17 +00:00
20 lines
448 B
JavaScript
20 lines
448 B
JavaScript
import {test, stub} from 'supertape';
|
|
import {scrollIntoViewIfNeeded} from './polyfill.mjs';
|
|
|
|
test('cloudcmd: client: polyfill: scrollIntoViewIfNeeded', (t) => {
|
|
const scroll = stub();
|
|
const el = {};
|
|
|
|
scrollIntoViewIfNeeded(el, {
|
|
scroll,
|
|
});
|
|
|
|
const args = [
|
|
el, {
|
|
block: 'nearest',
|
|
},
|
|
];
|
|
|
|
t.calledWith(scroll, args, 'should call scrollIntoViewIfNeeded');
|
|
t.end();
|
|
});
|