diff --git a/__tests__/scroll-lock-integration.tsx b/__tests__/scroll-lock-integration.tsx new file mode 100644 index 0000000..8c32150 --- /dev/null +++ b/__tests__/scroll-lock-integration.tsx @@ -0,0 +1,29 @@ +import * as React from 'react'; +import {configure, mount} from 'enzyme'; +import {FocusOn} from '../src/UI'; +import {sidecar} from "use-sidecar"; +import { RemoveScroll } from 'react-remove-scroll/UI'; +import * as Adapter from 'enzyme-adapter-react-16'; + +configure({ adapter: new Adapter() }); + + + +const tick = () => new Promise(resolve => setTimeout(resolve, 10)); + +const car = sidecar(() => import ('../src/sidecar')); + +describe('UI', () => { + it('gap off', async () => { + const wrapper = mount( + content + ); + expect((wrapper).find(RemoveScroll).prop('gapMode')).toBe(undefined); + }); + it('gap off', async () => { + const wrapper = mount( + content + ); + expect((wrapper).find(RemoveScroll).prop('gapMode')).toBe('padding'); + }); +});