import { readFileSync } from 'node:fs'; import { join } from 'node:path'; import { describe, expect, test } from 'vitest'; function fragment(source: string, start: string, end: string): string { const from = source.indexOf(start); const to = source.indexOf(end, from); if (from < 0 || to < 0) throw new Error(`Missing production fragment: ${start}`); return source.slice(from, to); } describe('cutter workspace actions production path', () => { const html = readFileSync(join(__dirname, 'index.html'), 'utf8'); test('keeps project open and save actions in the persistent loaded toolbar', () => { const toolbar = fragment(html, '