fix swipe snapshot

This commit is contained in:
陈嘉涵
2019-05-08 16:42:19 +08:00
parent 427fd3da15
commit f0e336cb4f
2 changed files with 33 additions and 25 deletions

View File

@@ -1,4 +1,12 @@
import Demo from '../demo';
import demoTest from '../../../test/demo-test';
function mockGetBoundingClientRect(vertical) {
Element.prototype.getBoundingClientRect = jest.fn(() => ({
width: 100,
height: 100
}));
}
mockGetBoundingClientRect();
demoTest(Demo);