import { ref } from 'vue'; import { useLayoutFullscreen } from '@/components/modal/layouts/composables/useLayoutFullscreen'; import { AnchorPoint } from '@3cr/types-ts'; describe('fullscreen tests', () => { const canvas = document.createElement('canvas'); canvas.getBoundingClientRect = vi.fn( () => ({ x: 0, y: 0, width: 100, height: 100 }) as DOMRect, ); it('fullscreen volume', () => { const anchor = AnchorPoint.CENTER; const { layout } = useLayoutFullscreen(anchor, canvas, ref(16)); expect(layout.value).toEqual({ height: 68, width: 68, x: 16, y: 16 }); }); });