mirror of
https://github.com/youzan/vant.git
synced 2025-10-15 15:40:52 +00:00
fix(cli): postcss loader option changed
This commit is contained in:
@@ -38,10 +38,10 @@ export function mockScrollIntoView() {
|
||||
|
||||
export function mockGetBoundingClientRect(
|
||||
rect: ClientRect | DOMRect
|
||||
): Function {
|
||||
): () => void {
|
||||
const originMethod = Element.prototype.getBoundingClientRect;
|
||||
|
||||
Element.prototype.getBoundingClientRect = <any>jest.fn(() => rect);
|
||||
Element.prototype.getBoundingClientRect = jest.fn(() => rect);
|
||||
|
||||
return function () {
|
||||
Element.prototype.getBoundingClientRect = originMethod;
|
||||
|
Reference in New Issue
Block a user