import { describe, test, expect } from 'vitest'; import { defaultPageLayouts } from './page.js'; describe('page.ts', () => { test.each(Object.entries(defaultPageLayouts))('getDefaultLayout snapshot %s', (version, genLayout) => { const layout = genLayout(); expect(layout).toMatchSnapshot(version); // modify the layout and check that it does not affect the next layout layout.widgetName = 'NewName'; const layout2 = genLayout(); expect(layout2.widgetName).not.toBe('NewName'); }); describe('v8', () => { test('with sections enabled', () => { const v8Layout = defaultPageLayouts['8'](); expect(v8Layout.layoutVersion).toBe(2); }); }); });