fix(scripts): exempt Storybook stories from coverage:diff gate
Story files are excluded from vitest by design (they run in Storybook
runner, not vitest). Add *.stories.{ts,tsx} to ALLOWED_GLOBS so the
L1 diff gate doesn't flag them as "new untested file".
Also add error-handling test for useOptionalConsent rethrow path
(cookie-consent-banner lines 52-53) achieving 100% statement coverage.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -32,6 +32,8 @@ import { execSync } from "node:child_process";
|
||||
const ALLOWED_GLOBS = [
|
||||
// Test artifacts
|
||||
/\.test\.(ts|tsx|js|mjs)$/,
|
||||
// Storybook story files — excluded from vitest by design; tested in Storybook runner
|
||||
/\.stories\.(ts|tsx)$/,
|
||||
/\/__factories__\//,
|
||||
/\/__contracts__\//,
|
||||
/\/__fixtures__\//,
|
||||
|
||||
Reference in New Issue
Block a user