Files
houseplan-card/test/pdf-font-assets.test.mjs
T
2026-09-07 03:47:57 +03:00

16 lines
567 B
JavaScript

import test from 'node:test';
import assert from 'node:assert/strict';
import path from 'node:path';
import { spawnSync } from 'node:child_process';
import { fileURLToPath } from 'node:url';
const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
test('the embedded PDF font subset stays in sync with its source and generator', () => {
const result = spawnSync(process.execPath, ['scripts/generate-pdf-font.mjs', '--check'], {
cwd: ROOT,
encoding: 'utf8',
});
assert.equal(result.status, 0, result.stderr || result.stdout);
});