fix(cli): postcss loader option changed

This commit is contained in:
chenjiahan
2020-11-21 22:20:16 +08:00
parent a46ba22943
commit 7e7484a5cb
5 changed files with 100 additions and 1025 deletions

View File

@@ -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;