mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
test: testing overhaul -- CI e2e gates, parallel suites, generated matrices, mutation testing (#215)
Closes the "e2e never runs in CI" hole. Adds per-PR e2e smoke gate, nightly full-suite workflows, parallel vitest forks (per-fork DBs), Playwright parallel/serial/visual projects against production builds, metadata-generated test suites (drift guards, hostile inputs, format matrix, pairwise settings, property-based fuzz), Stryker mutation testing, Schemathesis API fuzz, coverage ratchet, and fixes for three session-poisoning bugs that caused 200+ serial-bucket failures. Bug fix included: favicon/split/bulk-rename could hang clients forever when ZIP streaming failed after reply.hijack().
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
* Minimal valid settings per tool, used by the generated matrices
|
||||
* (format-matrix-generated, hostile-inputs) when posting to tool routes.
|
||||
*
|
||||
* Default is {} (most schemas make every field optional). Tools whose schema
|
||||
* rejects {} get an explicit minimal override here. The "defaults are valid"
|
||||
* test in format-matrix-generated.test.ts safeParses every entry against the
|
||||
* live schema, so a schema change that invalidates an entry fails at PR time
|
||||
* and names the tool.
|
||||
*/
|
||||
export const TOOL_SETTINGS_OVERRIDES: Record<string, unknown> = {
|
||||
resize: { width: 64 },
|
||||
crop: { left: 0, top: 0, width: 50, height: 50 },
|
||||
convert: { format: "png" },
|
||||
"watermark-text": { text: "Test" },
|
||||
"text-overlay": { text: "Test" },
|
||||
"passport-photo": { countryCode: "us" },
|
||||
};
|
||||
|
||||
export function defaultSettingsFor(toolId: string): unknown {
|
||||
return TOOL_SETTINGS_OVERRIDES[toolId] ?? {};
|
||||
}
|
||||
Reference in New Issue
Block a user