Vitest, with 70 tests across the pure lib modules - formatting (IRC codes, BBCode, spoilers, emoji and emotes, media and YouTube detection), media URL resolution including the file-version fragment, the rail and its folders, mentions, search filters, nick completion, Kick watching, emote and interruption state - and the media scheme's boundary in the main process, with Electron stubbed. scripts/ui-check.mjs runs the built app against a scratch home and a fake IRC server, opens the emoji picker, the channel, message and member menus (right-clicked in the window's far corner) and the mentions inbox at two window sizes, and fails if any of them leaves the window at 80 ms, 400 ms, 1.5 s or 3.5 s. Checked that it fails: with the context menu's clamping removed it reports every corner-opened menu outside the window. npm test and the layout check (under xvfb) run in the Linux release job. #212 Co-Authored-By: Claude Opus 5.5 <[email protected]>
16 lines
527 B
TypeScript
16 lines
527 B
TypeScript
import { defineConfig } from 'vitest/config'
|
|
|
|
/**
|
|
* The unit tests: the window's pure logic, and the main process's media
|
|
* boundary. Node by default - most of what is tested is data in, data out,
|
|
* and needs no DOM at all. Layout is not tested here: a DOM without a layout
|
|
* engine measures everything as 0x0, which is exactly how a popup that hangs
|
|
* off the screen passes. That is scripts/ui-check.mjs's job.
|
|
*/
|
|
export default defineConfig({
|
|
test: {
|
|
include: ['src/**/*.test.ts'],
|
|
environment: 'node'
|
|
}
|
|
})
|