[new feature] IndexBar: add sticky prop (#3402)
This commit is contained in:
@@ -70,3 +70,13 @@ export function later(delay: number = 0): Promise<void> {
|
||||
export function transitionStub(): void {
|
||||
Vue.component('transition', TransitionStub as any);
|
||||
}
|
||||
|
||||
export function mockGetBoundingClientRect(rect: ClientRect | DOMRect): Function {
|
||||
const originMethod = Element.prototype.getBoundingClientRect;
|
||||
|
||||
Element.prototype.getBoundingClientRect = <any> jest.fn(() => rect);
|
||||
|
||||
return function () {
|
||||
Element.prototype.getBoundingClientRect = originMethod;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user