openpencil/tests/engine/tauri/mock-cleanup.test.ts
Danila Poyarkov 076f7ce0d9
fix: restore engine test coverage and isolation (#653)
* ci: require complete engine test shard coverage

* test: provide path data in the font editing gate fixture

* test: remove stale Tauri runtime markers during cleanup

* fix(collab): deduplicate pending page switches

* test: simplify pending page switch regression setup
2026-09-06 23:29:45 +03:00

17 lines
539 B
TypeScript

import { afterEach, expect, test } from 'bun:test'
import { clearTauriMocks, installTauriMockWindow, mockTauriIPC } from '#tests/helpers/tauri/mocks'
afterEach(clearTauriMocks)
test('clearing IPC mocks removes runtime markers before reinstalling a window', async () => {
await mockTauriIPC(() => null)
expect('__TAURI_INTERNALS__' in window).toBe(true)
await clearTauriMocks()
installTauriMockWindow()
expect('__TAURI_INTERNALS__' in window).toBe(false)
expect('__TAURI_EVENT_PLUGIN_INTERNALS__' in window).toBe(false)
})