import { readFileSync } from 'node:fs' import { describe, expect, it } from 'vitest' const configSource = readFileSync( new URL('./WidgetConfigSheet.vue', import.meta.url), 'utf8', ) const pickerSource = readFileSync( new URL('./WidgetPickerSheet.vue', import.meta.url), 'utf8', ) const widgetSource = readFileSync( new URL('./SpringboardWidget.vue', import.meta.url), 'utf8', ) describe('WidgetConfigSheet Sky UI contract', () => { it('uses first-party Sky UI controls for the configuration surface', () => { expect(configSource).not.toContain("from 'konsta/vue'") expect(configSource).not.toMatch(/<\/?k-[a-z]/) expect(configSource).toContain(' { expect(configSource).not.toContain(' { expect(configSource.match(/ { expect(configSource).not.toContain(':deep(.home-widget-shell--preview)') expect(pickerSource).not.toContain(':deep(.home-widget-shell--preview)') expect(widgetSource).toMatch( /\.home-widget-shell--preview\.home-widget-shell--small\s*\{[^}]*max-width:\s*150px;[^}]*aspect-ratio:\s*1;/s, ) }) })