Spaces:
Sleeping
Sleeping
File size: 650 Bytes
dc7ee79 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | #!/usr/bin/env node
/**
* Regenerates the deterministic baseline snapshot used in tests.
*/
import { writeFileSync, mkdirSync } from 'fs';
import { dirname } from 'path';
import { convertHtmlFile } from '../src/pipeline/convert.js';
const SNAPSHOT_PATH = 'tests/landing-page/expected-snapshot.json';
const INPUT_PATH = './tests/landing-page/input.html';
const output = await convertHtmlFile(INPUT_PATH, {
viewport: { width: 1440, height: 900 },
});
mkdirSync(dirname(SNAPSHOT_PATH), { recursive: true });
writeFileSync(SNAPSHOT_PATH, JSON.stringify(output, null, 2));
console.log(`Updated snapshot at ${SNAPSHOT_PATH}`);
|