Resize the container based on media loads.

This commit is contained in:
Dermot Duffy
2023-09-04 19:31:54 -07:00
parent 1554cb41e8
commit d425457781
5 changed files with 19 additions and 16 deletions
@@ -15,7 +15,6 @@ import {
createTestSlideNodes,
} from '../../test-utils';
// Mock out debouncing (used in the reinit controller).
vi.mock('lodash-es/debounce', () => ({
default: vi.fn((fn) => fn),
}));
+1 -6
View File
@@ -1,5 +1,5 @@
import Masonry from 'masonry-layout';
import { beforeAll, beforeEach, describe, expect, it, vi } from 'vitest';
import { beforeEach, describe, expect, it, vi } from 'vitest';
import { mock } from 'vitest-mock-extended';
import { MediaLoadedInfo } from '../../src/types';
import {
@@ -12,7 +12,6 @@ import {
ResizeObserverMock,
createSlot,
createSlotHost,
requestAnimationFrameMock,
} from '../test-utils';
vi.mock('lodash-es/throttle', () => ({
@@ -82,10 +81,6 @@ describe('MediaGridController', () => {
height: 20,
};
beforeAll(() => {
window.requestAnimationFrame = requestAnimationFrameMock;
});
beforeEach(() => {
vi.clearAllMocks();
vi.stubGlobal('MutationObserver', MutationObserverMock);