Skip to content

Commit

Permalink
update snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
narthur committed Jul 16, 2024
1 parent 76f6be0 commit 27fa7f7
Show file tree
Hide file tree
Showing 5 changed files with 17,635 additions and 16,983 deletions.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
"lint": "eslint .",
"format": "prettier --write .",
"preinstall": "npx only-allow pnpm",
"puppeteer": "tsx ./scripts/puppeteer.ts"
"puppeteer": "tsx ./scripts/puppeteer.ts",
"puppeteer:report": "tsx ./scripts/puppeteer-report.ts",
"puppeteer:reset": "pnpm run cache:clear && pnpm run build && rm -rf ./shots && mkdir ./shots"
},
"dependencies": {
"@astrojs/prefetch": "^0.4.1",
Expand Down
15 changes: 15 additions & 0 deletions scripts/puppeteer-report.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import url from "url";
import { createReport } from "pixelteer";

const port = 4321;
const base = `https://blog.beeminder.com`;
const compare = `http://localhost:${port}`;
const outPath = new URL("../shots/", import.meta.url);
const root = new URL("..", import.meta.url);

createReport({
baseUrl1: base,
baseUrl2: compare,
shotsDir: url.fileURLToPath(outPath),
outDir: url.fileURLToPath(root),
});
2 changes: 1 addition & 1 deletion scripts/puppeteer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const server = await preview({
});

const urls = await getSitemap();
const paths = urls.map((url) => new URL(url).pathname);
const paths = urls.map((url) => new URL(url).pathname + "?snap");

await compareUrls({
baseUrl1: base,
Expand Down
10 changes: 10 additions & 0 deletions src/lib/__snapshots__/canonicalizeUrl.spec-snapshot.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,8 @@ exports[`canonicalizeUrl > handles source 'doc.bmndr.co/goalnames' 1`] = `"https

exports[`canonicalizeUrl > handles source 'doc.bmndr.co/gratitude' 1`] = `"https://the_source_domain/gratitude/export/txt"`;

exports[`canonicalizeUrl > handles source 'doc.bmndr.co/groupies' 1`] = `"https://the_source_domain/groupies/export/txt"`;

exports[`canonicalizeUrl > handles source 'doc.bmndr.co/gtbee' 1`] = `"https://the_source_domain/gtbee/export/txt"`;

exports[`canonicalizeUrl > handles source 'doc.bmndr.co/gym' 1`] = `"https://the_source_domain/gym/export/txt"`;
Expand Down Expand Up @@ -378,6 +380,8 @@ exports[`canonicalizeUrl > handles source 'doc.bmndr.co/josh' 1`] = `"https://th

exports[`canonicalizeUrl > handles source 'doc.bmndr.co/joshstickk' 1`] = `"https://the_source_domain/joshstickk/export/txt"`;

exports[`canonicalizeUrl > handles source 'doc.bmndr.co/journal' 1`] = `"https://the_source_domain/journal/export/txt"`;

exports[`canonicalizeUrl > handles source 'doc.bmndr.co/kara' 1`] = `"https://the_source_domain/kara/export/txt"`;

exports[`canonicalizeUrl > handles source 'doc.bmndr.co/kibeemium' 1`] = `"https://the_source_domain/kibeemium/export/txt"`;
Expand Down Expand Up @@ -488,6 +492,8 @@ exports[`canonicalizeUrl > handles source 'doc.bmndr.co/ontologies' 1`] = `"http

exports[`canonicalizeUrl > handles source 'doc.bmndr.co/orange' 1`] = `"https://the_source_domain/orange/export/txt"`;

exports[`canonicalizeUrl > handles source 'doc.bmndr.co/ownwords' 1`] = `"https://the_source_domain/ownwords/export/txt"`;

exports[`canonicalizeUrl > handles source 'doc.bmndr.co/pact' 1`] = `"https://the_source_domain/pact/export/txt"`;

exports[`canonicalizeUrl > handles source 'doc.bmndr.co/pareto' 1`] = `"https://the_source_domain/pareto/export/txt"`;
Expand Down Expand Up @@ -716,6 +722,8 @@ exports[`canonicalizeUrl > handles source 'doc.bmndr.co/weighly' 1`] = `"https:/

exports[`canonicalizeUrl > handles source 'doc.bmndr.co/wetfeet' 1`] = `"https://the_source_domain/wetfeet/export/txt"`;

exports[`canonicalizeUrl > handles source 'doc.bmndr.co/wetterfeet' 1`] = `"https://the_source_domain/wetterfeet/export/txt"`;

exports[`canonicalizeUrl > handles source 'doc.bmndr.co/weusethat' 1`] = `"https://the_source_domain/weusethat/export/txt"`;

exports[`canonicalizeUrl > handles source 'doc.bmndr.co/whattomind' 1`] = `"https://the_source_domain/whattomind/export/txt"`;
Expand All @@ -736,6 +744,8 @@ exports[`canonicalizeUrl > handles source 'doc.bmndr.co/wsj2' 1`] = `"https://th

exports[`canonicalizeUrl > handles source 'doc.bmndr.co/ybhp' 1`] = `"https://the_source_domain/ybhp/export/txt"`;

exports[`canonicalizeUrl > handles source 'doc.bmndr.co/ynab' 1`] = `"https://the_source_domain/ynab/export/txt"`;

exports[`canonicalizeUrl > handles source 'doc.bmndr.co/zapier' 1`] = `"https://the_source_domain/zapier/export/txt"`;

exports[`canonicalizeUrl > handles source 'doc.bmndr.co/zeno' 1`] = `"https://the_source_domain/zeno/export/txt"`;
Expand Down
Loading

0 comments on commit 27fa7f7

Please sign in to comment.