Skip to content

Commit 8979ce7

Browse files
authored
Merge pull request #2698 from PostHog/posthog-code/wizard-ci-snapshots-read-ans
fix(wizard-ci): read .ans snapshot frames, not just .txt
2 parents 37ccfd6 + 8c979c4 commit 8979ce7

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

services/wizard-ci/snapshots-review.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ async function main(): Promise<number> {
157157
const txtDest = join(dest, "frames");
158158
mkdirSync(txtDest, { recursive: true });
159159
for (const f of readdirSync(txtDir))
160-
if (f.endsWith(".txt") && f !== "latest.txt")
160+
if ((f.endsWith(".txt") || f.endsWith(".ans")) && f !== "latest.txt")
161161
cpSync(join(txtDir, f), join(txtDest, f));
162162
}
163163

services/wizard-ci/snapshots.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ interface Frame {
6262
function readFrames(dir: string): Frame[] {
6363
if (!existsSync(dir)) return [];
6464
return readdirSync(dir)
65-
.filter((f) => f.endsWith(".txt"))
65+
.filter((f) => f.endsWith(".txt") || f.endsWith(".ans"))
6666
.sort()
6767
.map((file) => ({ file, text: readFileSync(join(dir, file), "utf8") }));
6868
}

0 commit comments

Comments
 (0)