import { describe, expect, it } from 'vitest';
import { resolveDefaultSitePreview } from '../../lib/editor-preview.js';
describe('resolveDefaultSitePreview', () => {
    it('returns false when unset', () => {
        expect(resolveDefaultSitePreview(undefined, 'pages')).toBe(false);
        expect(resolveDefaultSitePreview({}, 'posts')).toBe(false);
    });
    it('honours a global true flag', () => {
        expect(resolveDefaultSitePreview({ defaultSitePreview: true }, 'pages')).toBe(true);
        expect(resolveDefaultSitePreview({ defaultSitePreview: true }, 'posts')).toBe(true);
    });
    it('honours per-collection flags', () => {
        const editor = { defaultSitePreview: { pages: true, posts: false } };
        expect(resolveDefaultSitePreview(editor, 'pages')).toBe(true);
        expect(resolveDefaultSitePreview(editor, 'posts')).toBe(false);
    });
});
//# sourceMappingURL=editor-preview.test.js.map