Skip to content

Commit 7bf19ab

Browse files
vanceingallsclaude
andauthored
test(engine): nightly motion blur run over generated compositions (#7437)
* test(engine): nightly motion blur run over generated compositions A seeded generator of text-free compositions combines 19 features (nested canvas, overflow, clip path, scroll container, callbacks, a last-child rule) and checks the two pixel invariants on auto: outside the trail at two holds and at a moving time, inside the trail at a moving time. The runtime lane runs seeds 1 to 3; motion-blur-nightly.yml runs 200 a day on the Chrome 153 pin and on stable, and opens one issue per failing seed. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> * test(engine): the nightly records every failure, ignores noisy references, caps its issues A crash, a timeout or a launch failure is recorded before the job goes red; a failing check whose blur-off reference disagrees with itself is reported as unstable instead of failing; the report job moves into a tested script that fetches open titles once, caps first, and opens one systemic issue above 5 seeds. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> * test(engine): the nightly report resists injected failure text and keeps a crashed leg's record Co-Authored-By: Claude Sonnet 5.5 <[email protected]> * fix(engine): nightly report escapes backslashes, test strips tags to a fixpoint Co-Authored-By: Claude Sonnet 5.5 <[email protected]> --------- Co-authored-by: Claude Sonnet 5.5 <[email protected]>
1 parent 4b3f70f commit 7bf19ab

9 files changed

Lines changed: 1482 additions & 19 deletions

File tree

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
name: motion-blur-nightly
2+
3+
permissions:
4+
contents: read
5+
6+
env:
7+
HYPERFRAMES_NO_TELEMETRY: "1"
8+
9+
concurrency:
10+
group: motion-blur-nightly
11+
cancel-in-progress: false
12+
13+
on:
14+
workflow_dispatch:
15+
inputs:
16+
seeds:
17+
description: "Seeds to run, a comma list or a-b range (default: today's 200)."
18+
type: string
19+
default: ""
20+
schedule:
21+
# Daily at 08:41 UTC, off the :00 pile and away from regression.yml's 06:17.
22+
- cron: "41 8 * * *"
23+
24+
jobs:
25+
plan:
26+
name: Plan seeds
27+
runs-on: ubuntu-latest
28+
timeout-minutes: 5
29+
outputs:
30+
chunks: ${{ steps.plan.outputs.chunks }}
31+
steps:
32+
# Today's 200 seeds are days-since-2026-01-01 * 200 onward, in 4 chunks of 50.
33+
- id: plan
34+
env:
35+
SEEDS: ${{ inputs.seeds }}
36+
run: |
37+
if [ -n "$SEEDS" ]; then
38+
chunks="$(jq -cn --arg seeds "$SEEDS" '[{id: "custom", seeds: $seeds}]')"
39+
else
40+
days=$(( ($(date -u +%s) - $(date -u -d 2026-01-01 +%s)) / 86400 ))
41+
start=$(( days * 200 ))
42+
chunks="$(jq -cn --argjson start "$start" '[range(0; 4) | ($start + . * 50) as $from | {id: ($from | tostring), seeds: "\($from)-\($from + 49)"}]')"
43+
fi
44+
echo "chunks=$chunks" >> "$GITHUB_OUTPUT"
45+
echo "$chunks"
46+
47+
generated:
48+
name: Generated compositions (${{ matrix.flavour }}, ${{ matrix.chunk.seeds }})
49+
needs: plan
50+
runs-on: ubuntu-latest
51+
timeout-minutes: 45
52+
strategy:
53+
fail-fast: false
54+
matrix:
55+
flavour: [pin, stable]
56+
chunk: ${{ fromJSON(needs.plan.outputs.chunks) }}
57+
steps:
58+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
59+
- id: workspace
60+
uses: ./.github/actions/setup-test-workspace
61+
with:
62+
engine: "true"
63+
headless-shell: "true"
64+
- id: pin
65+
if: matrix.flavour == 'pin'
66+
shell: bash
67+
run: |
68+
dir="$RUNNER_TEMP/headless-shell-pin"
69+
bunx @puppeteer/[email protected] install [email protected] --path "$dir"
70+
echo "path=$(find "$dir" -type f -name chrome-headless-shell | head -n 1)" >> "$GITHUB_OUTPUT"
71+
- name: Run the generated compositions
72+
working-directory: packages/engine
73+
env:
74+
HYPERFRAMES_BROWSER_PATH: ${{ matrix.flavour == 'pin' && steps.pin.outputs.path || steps.workspace.outputs.headless-shell-path }}
75+
HF_BLUR_SEEDS: ${{ matrix.chunk.seeds }}
76+
HF_BLUR_FAILURES_FILE: ${{ github.workspace }}/blur-nightly-failures.json
77+
HF_BLUR_REQUIRED: "1"
78+
run: bunx vitest run --project browser src/services/captureMotionBlur.generated.browser.test.ts
79+
- name: Keep the failing seeds
80+
if: always()
81+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
82+
with:
83+
name: blur-nightly-failures-${{ matrix.flavour }}-${{ matrix.chunk.id }}
84+
path: blur-nightly-failures.json
85+
if-no-files-found: ignore
86+
87+
report:
88+
name: Report failures
89+
needs: [plan, generated]
90+
if: always() && needs.plan.result == 'success'
91+
runs-on: ubuntu-latest
92+
timeout-minutes: 10
93+
permissions:
94+
contents: read
95+
issues: write
96+
steps:
97+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
98+
with:
99+
persist-credentials: false
100+
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
101+
continue-on-error: true
102+
with:
103+
pattern: blur-nightly-failures-*
104+
path: failures
105+
- name: Open issues, warn and summarize
106+
env:
107+
GH_TOKEN: ${{ github.token }}
108+
GH_REPO: ${{ github.repository }}
109+
GENERATED_RESULT: ${{ needs.generated.result }}
110+
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
111+
run: >-
112+
node scripts/ci/motion-blur-nightly-report.mjs
113+
--failures failures
114+
--generated-result "$GENERATED_RESULT"
115+
--date "$(date -u +%F)"
116+
--run-url "$RUN_URL"
117+
--summary "$GITHUB_STEP_SUMMARY"

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"player:perf": "bun run --filter @hyperframes/player perf",
5555
"format:check": "oxfmt --check .",
5656
"knip": "knip",
57-
"test:scripts": "node --import tsx --test scripts/animejs-v4-guidance.test.mjs scripts/check-tracked-artifacts.test.mjs scripts/check-registry-set-delta.test.mjs scripts/check-no-main-deletions.test.mjs scripts/check-pr-captures.test.mjs scripts/check-comment-citations.test.mjs scripts/comments-workflow.test.mjs scripts/comment-ratchet.test.mjs scripts/check-docs-snippet-motion.test.mjs scripts/registry-target-paths.test.mjs scripts/check-workspace-contracts.test.mjs scripts/check-media-use-copy-parity.test.mjs scripts/check-svg-sanitize-parity.test.mjs scripts/check-media-use-svg-sanitize-generated.test.mjs scripts/check-package-cycles.test.mjs scripts/check-cli-process-ownership.test.mjs scripts/check-cli-lazy-deps.test.mjs scripts/file-url-paths.test.mjs scripts/check-studio-copy-dashes.test.mjs scripts/check-large-files.test.mjs scripts/package-subpaths.test.mjs scripts/validate-release-channel.test.mjs scripts/clawhub-sync.test.mjs scripts/clawhub-unlist-retired.test.mjs scripts/publish-workflow.test.mjs scripts/pr-edit-concurrency.test.mjs scripts/merge-queue-workflows.test.mjs scripts/ci-cache-workflows.test.mjs scripts/install-workspace-dependencies.test.mjs scripts/check-edit-accuracy-filter.test.mjs scripts/edit-accuracy-retry.test.mjs scripts/draft-changelog.test.ts scripts/set-version.test.ts scripts/release-prepare.test.ts scripts/cli-options.test.ts scripts/changelog-weekly.test.ts scripts/claude-plugin-compression.test.ts scripts/catalog-payload-assets.test.ts scripts/host-registry-assets.test.ts scripts/catalog-preview-temp.test.ts scripts/backfill-block-previews.test.ts scripts/catalog-hosted-files.test.ts scripts/player-cdn-pin.test.ts scripts/studio-runtime-smoke.test.mjs scripts/verify-packed-manifests.test.mjs scripts/rewrite-relative-import-extensions.test.mjs scripts/lint-skills.test.mjs scripts/check-core-skills.test.mjs scripts/creator-editing-recipes.test.mjs packages/gcp-cloud-run/check-dockerfile-workspaces.test.mjs packages/core/scripts/writeGeneratedFile.test.ts scripts/catalog-publication.test.mjs scripts/ci/resolve-workflow-pr.test.mjs scripts/lefthook-order.test.mjs scripts/inline-gsap.test.mjs scripts/ci/flake-gate.test.mjs scripts/ci/base-file.test.mjs scripts/ci/release-only-diff.test.mjs scripts/check-catalog-source-pr.test.mjs scripts/generate-registry-items.test.ts scripts/catalog-drift.test.ts scripts/catalog-fetch-mirror.test.ts scripts/catalog-script-inlining.test.ts scripts/catalog-detail.test.ts scripts/generate-catalog-pages.test.ts scripts/verify-catalog-payloads.test.ts scripts/registry-theme-fallbacks.test.ts scripts/registry-skill-files.test.ts scripts/creator-editing-capabilities.test.mjs scripts/generate-catalog-previews.test.ts scripts/registry-primitive-payloads.test.ts registry/components/pan-stations/pan-stations.test.mjs registry/components/filmed-screen/filmed-screen.test.mjs registry/components/echo-smear/echo-smear.test.mjs registry/examples/path-traced-3d/source/path-traced-3d.test.mjs && vitest run scripts/catalog/ scripts/contrastRatchet.test.ts scripts/generate-catalog-payloads.test.ts",
57+
"test:scripts": "node --import tsx --test scripts/animejs-v4-guidance.test.mjs scripts/check-tracked-artifacts.test.mjs scripts/check-registry-set-delta.test.mjs scripts/check-no-main-deletions.test.mjs scripts/check-pr-captures.test.mjs scripts/check-comment-citations.test.mjs scripts/comments-workflow.test.mjs scripts/comment-ratchet.test.mjs scripts/check-docs-snippet-motion.test.mjs scripts/registry-target-paths.test.mjs scripts/check-workspace-contracts.test.mjs scripts/check-media-use-copy-parity.test.mjs scripts/check-svg-sanitize-parity.test.mjs scripts/check-media-use-svg-sanitize-generated.test.mjs scripts/check-package-cycles.test.mjs scripts/check-cli-process-ownership.test.mjs scripts/check-cli-lazy-deps.test.mjs scripts/file-url-paths.test.mjs scripts/check-studio-copy-dashes.test.mjs scripts/check-large-files.test.mjs scripts/package-subpaths.test.mjs scripts/validate-release-channel.test.mjs scripts/clawhub-sync.test.mjs scripts/clawhub-unlist-retired.test.mjs scripts/publish-workflow.test.mjs scripts/pr-edit-concurrency.test.mjs scripts/merge-queue-workflows.test.mjs scripts/ci-cache-workflows.test.mjs scripts/install-workspace-dependencies.test.mjs scripts/check-edit-accuracy-filter.test.mjs scripts/edit-accuracy-retry.test.mjs scripts/draft-changelog.test.ts scripts/set-version.test.ts scripts/release-prepare.test.ts scripts/cli-options.test.ts scripts/changelog-weekly.test.ts scripts/claude-plugin-compression.test.ts scripts/catalog-payload-assets.test.ts scripts/host-registry-assets.test.ts scripts/catalog-preview-temp.test.ts scripts/backfill-block-previews.test.ts scripts/catalog-hosted-files.test.ts scripts/player-cdn-pin.test.ts scripts/studio-runtime-smoke.test.mjs scripts/verify-packed-manifests.test.mjs scripts/rewrite-relative-import-extensions.test.mjs scripts/lint-skills.test.mjs scripts/check-core-skills.test.mjs scripts/creator-editing-recipes.test.mjs packages/gcp-cloud-run/check-dockerfile-workspaces.test.mjs packages/core/scripts/writeGeneratedFile.test.ts scripts/catalog-publication.test.mjs scripts/ci/resolve-workflow-pr.test.mjs scripts/lefthook-order.test.mjs scripts/inline-gsap.test.mjs scripts/ci/flake-gate.test.mjs scripts/ci/motion-blur-nightly-report.test.mjs scripts/ci/base-file.test.mjs scripts/ci/release-only-diff.test.mjs scripts/check-catalog-source-pr.test.mjs scripts/generate-registry-items.test.ts scripts/catalog-drift.test.ts scripts/catalog-fetch-mirror.test.ts scripts/catalog-script-inlining.test.ts scripts/catalog-detail.test.ts scripts/generate-catalog-pages.test.ts scripts/verify-catalog-payloads.test.ts scripts/registry-theme-fallbacks.test.ts scripts/registry-skill-files.test.ts scripts/creator-editing-capabilities.test.mjs scripts/generate-catalog-previews.test.ts scripts/registry-primitive-payloads.test.ts registry/components/pan-stations/pan-stations.test.mjs registry/components/filmed-screen/filmed-screen.test.mjs registry/components/echo-smear/echo-smear.test.mjs registry/examples/path-traced-3d/source/path-traced-3d.test.mjs && vitest run scripts/catalog/ scripts/contrastRatchet.test.ts scripts/generate-catalog-payloads.test.ts",
5858
"typecheck:scripts": "tsc --noEmit -p scripts/tsconfig.json",
5959
"test:skills": "HYPERFRAMES_MEDIA_HOME_REQUIRED=1 node --import ./packages/cli/scripts/test-home.mjs --test 'skills/**/*.test.mjs' 'packages/cli/src/media-use/**/*.test.mjs'",
6060
"generate:previews": "tsx scripts/generate-template-previews.ts",

‎packages/engine/src/services/__fixtures__/motionBlur/differentialPage.ts‎

Lines changed: 66 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -69,20 +69,29 @@ export function firstFive(d: Differential): string {
6969
return JSON.stringify(d.bad.slice(0, 5));
7070
}
7171

72+
export interface Measured {
73+
d: Differential;
74+
reference: Rgba;
75+
onFrame: Rgba;
76+
mask: Uint8Array;
77+
}
78+
7279
export async function measureOutside(
7380
browser: Browser,
7481
f: BlurFixture,
7582
t: number,
7683
tier?: Tier,
77-
): Promise<Differential> {
84+
): Promise<Measured> {
7885
const offFrames = await captureInOrder(await referencePage(f), neighbourTimes(t));
7986
const onFrame = await onFreshPage(browser, f, "on", (p) => captureFrame(p, t), tier);
8087
const reference = offFrames[INVARIANTS.radiusFrames];
8188
if (!reference) throw new Error("missing reference frame");
82-
return compareTiles(reference, onFrame, trailMask(offFrames, radiusPx(f)), "outside", {
89+
const mask = trailMask(offFrames, radiusPx(f));
90+
const d = compareTiles(reference, onFrame, mask, "outside", {
8391
block: INVARIANTS.block,
8492
maxMae: INVARIANTS.outsideMaxMae,
8593
});
94+
return { d, reference, onFrame, mask };
8695
}
8796

8897
export const caseName = (what: string, f: BlurFixture, t: number, tier?: Tier): string =>
@@ -114,8 +123,11 @@ async function referencePage(f: BlurFixture): Promise<Page> {
114123
}
115124

116125
export async function stopChrome(): Promise<void> {
117-
await closeReference();
118-
await closeTestChrome(launched);
126+
try {
127+
await closeReference();
128+
} finally {
129+
await closeTestChrome(launched);
130+
}
119131
}
120132

121133
export function chrome(): Browser {
@@ -134,7 +146,7 @@ export function defineOutsideCase(f: BlurFixture, t: number, tier?: Tier): void
134146
caseName("outside the trail, blur on equals blur off", f, t, tier),
135147
async (ctx) => {
136148
if (!supported) ctx.skip();
137-
const d = await measureOutside(chrome(), f, t, tier);
149+
const { d } = await measureOutside(chrome(), f, t, tier);
138150
expect(d.bad, `${f.name} ${firstFive(d)}`).toEqual([]);
139151
expect(d.checkedFraction).toBeGreaterThanOrEqual(INVARIANTS.minCheckedFraction);
140152
},
@@ -154,22 +166,60 @@ function expectBlurredAwayFromSharp(
154166
);
155167
}
156168

169+
const shutterMean = async (page: Page, t: number): Promise<Rgba> =>
170+
meanFrame(
171+
await captureInOrder(page, shutterTimes(t), { subFrameDivisions: SUB_FRAME_DIVISIONS }),
172+
);
173+
174+
export async function measureInside(
175+
browser: Browser,
176+
f: BlurFixture,
177+
t: number,
178+
tier?: Tier,
179+
): Promise<Measured> {
180+
const samples = await captureInOrder(await referencePage(f), shutterTimes(t), {
181+
subFrameDivisions: SUB_FRAME_DIVISIONS,
182+
});
183+
const onFrame = await onFreshPage(browser, f, "on", (p) => captureFrame(p, t), tier);
184+
const reference = meanFrame(samples);
185+
const mask = trailMask(samples, radiusPx(f));
186+
const d = compareTiles(reference, onFrame, mask, "inside", {
187+
block: INVARIANTS.block,
188+
maxMae: INVARIANTS.insideMaxMae,
189+
});
190+
return { d, reference, onFrame, mask };
191+
}
192+
193+
export const REFERENCE_RECAPTURES = 3;
194+
195+
export async function blurOffDisagreement(
196+
browser: Browser,
197+
f: BlurFixture,
198+
region: "outside" | "inside",
199+
t: number,
200+
first: Measured,
201+
): Promise<number | undefined> {
202+
const maxMae = region === "outside" ? INVARIANTS.outsideMaxMae : INVARIANTS.insideMaxMae;
203+
for (let i = 0; i < REFERENCE_RECAPTURES; i++) {
204+
const again = await onFreshPage(browser, f, "off", (p) =>
205+
region === "outside" ? captureFrame(p, t) : shutterMean(p, t),
206+
);
207+
const d = compareTiles(first.reference, again, first.mask, region, {
208+
block: INVARIANTS.block,
209+
maxMae,
210+
});
211+
if (d.bad.length > 0) return d.worstMae;
212+
}
213+
return undefined;
214+
}
215+
157216
export function defineInsideCase(f: BlurFixture, t: number, tier?: Tier): void {
158217
it(
159218
caseName("inside the trail, blur on matches the shutter average", f, t, tier),
160219
async (ctx) => {
161220
if (!supported) ctx.skip();
162-
const offPage = await referencePage(f);
163-
const samples = await captureInOrder(offPage, shutterTimes(t), {
164-
subFrameDivisions: SUB_FRAME_DIVISIONS,
165-
});
166-
const sharp = await captureFrame(offPage, t);
167-
const onFrame = await onFreshPage(chrome(), f, "on", (p) => captureFrame(p, t), tier);
168-
const mask = trailMask(samples, radiusPx(f));
169-
const d = compareTiles(meanFrame(samples), onFrame, mask, "inside", {
170-
block: INVARIANTS.block,
171-
maxMae: INVARIANTS.insideMaxMae,
172-
});
221+
const { d, onFrame, mask } = await measureInside(chrome(), f, t, tier);
222+
const sharp = await captureFrame(await referencePage(f), t);
173223
expect(d.checkedBlocks).toBeGreaterThan(0);
174224
expect(d.bad, `${f.name} ${firstFive(d)}`).toEqual([]);
175225
expectBlurredAwayFromSharp(f, sharp, onFrame, mask);

‎packages/engine/src/services/__fixtures__/motionBlur/fixtures.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const SLIDE = 0.4;
3434
const frame = (k: number): number => k / 30;
3535
const frames = (...ks: number[]): number[] => ks.map(frame);
3636

37-
interface Spec {
37+
export interface Spec {
3838
name: string;
3939
width?: number;
4040
height?: number;
@@ -114,7 +114,7 @@ function compose(spec: Spec, blur: "on" | "off", tier?: "capture" | "filter"): s
114114
</body></html>`;
115115
}
116116

117-
function fixture(spec: Spec): BlurFixture {
117+
export function fixture(spec: Spec): BlurFixture {
118118
return {
119119
name: spec.name,
120120
width: spec.width ?? 320,
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
import { describe, expect, it } from "vitest";
2+
import {
3+
EXCLUDED_FEATURES,
4+
FEATURES,
5+
generateComposition,
6+
parseSeeds,
7+
type Feature,
8+
} from "./generate.js";
9+
10+
const SEEDS = parseSeeds("1-200");
11+
12+
const GSAP_SCRIPT = /<script>\/\*![\s\S]*?<\/script>/;
13+
14+
const withoutMatches = (text: string, pattern: RegExp): string => {
15+
let current = text;
16+
for (
17+
let next = current.replace(pattern, "");
18+
next !== current;
19+
next = current.replace(pattern, "")
20+
) {
21+
current = next;
22+
}
23+
return current;
24+
};
25+
26+
const visibleText = (html: string): string =>
27+
withoutMatches(withoutMatches(html, /<(script|style)[\s\S]*?<\/\1>/g), /<[^>]*>/g).trim();
28+
29+
describe("generateComposition", () => {
30+
it("is deterministic per seed", () => {
31+
for (const seed of [1, 17, 200]) {
32+
const a = generateComposition(seed);
33+
const b = generateComposition(seed);
34+
expect(b.features).toEqual(a.features);
35+
expect(b.name).toBe(a.name);
36+
expect(b.checkpoints).toEqual(a.checkpoints);
37+
expect(b.html("on")).toBe(a.html("on"));
38+
expect(b.html("off")).toBe(a.html("off"));
39+
}
40+
});
41+
42+
it("varies with the seed", () => {
43+
const documents = new Set(SEEDS.map((seed) => generateComposition(seed).html("on")));
44+
expect(documents.size).toBeGreaterThan(150);
45+
});
46+
47+
it("uses every feature within 200 seeds", () => {
48+
const seen = new Set<Feature>();
49+
for (const seed of SEEDS)
50+
for (const feature of generateComposition(seed).features) seen.add(feature);
51+
expect([...FEATURES].filter((feature) => !seen.has(feature))).toEqual([]);
52+
});
53+
54+
it("holds each composition to 1 to 4 features at 320x180, 2 s, 30 fps", () => {
55+
for (const seed of SEEDS) {
56+
const f = generateComposition(seed);
57+
expect(f.features.length).toBeGreaterThanOrEqual(1);
58+
expect(f.features.length).toBeLessThanOrEqual(4);
59+
expect(new Set(f.features).size).toBe(f.features.length);
60+
expect([f.width, f.height, f.durationSeconds, f.fps, f.dpr]).toEqual([320, 180, 2, 30, 1]);
61+
expect(f.checkpoints).toHaveLength(2);
62+
expect(f.moving).toHaveLength(1);
63+
expect(f.name).toBe(`seed ${seed} [${f.features.join(", ")}]`);
64+
}
65+
});
66+
67+
it("keeps the features known wrong on the filter tier out", () => {
68+
expect(EXCLUDED_FEATURES).toEqual({ ownClipPath: "E", visibilityToggle: "O" });
69+
for (const seed of SEEDS) {
70+
const html = generateComposition(seed).html("on").replace(GSAP_SCRIPT, "");
71+
expect(html).not.toMatch(/#card[^{]*\{[^}]*(clip-path|mask)/);
72+
expect(html).not.toMatch(/visibility/);
73+
}
74+
});
75+
76+
it("draws no text", () => {
77+
for (const seed of SEEDS) expect(visibleText(generateComposition(seed).html("on"))).toBe("");
78+
});
79+
80+
it("pins no tier on the blur-on page", () => {
81+
for (const seed of [1, 2, 3]) {
82+
expect(generateComposition(seed).html("on")).not.toContain("data-motion-blur-tier");
83+
}
84+
});
85+
});
86+
87+
describe("parseSeeds", () => {
88+
it("reads lists and ranges", () => {
89+
expect(parseSeeds("1,2,3")).toEqual([1, 2, 3]);
90+
expect(parseSeeds("5-8")).toEqual([5, 6, 7, 8]);
91+
expect(parseSeeds("4,10-11")).toEqual([4, 10, 11]);
92+
expect(() => parseSeeds("x")).toThrow("bad seed list");
93+
});
94+
});

0 commit comments

Comments
 (0)