feat: v0.3.1 — show app version in header (sourced from package.json)

This commit is contained in:
2026-09-17 06:37:28 +00:00
parent b7796e5d78
commit b011953087
6 changed files with 40 additions and 1 deletions
+16
View File
@@ -0,0 +1,16 @@
import { readFileSync } from 'node:fs';
import pkg from '../package.json';
import { describe, expect, it } from 'vitest';
const mapSource = readFileSync(new URL('./Map.tsx', import.meta.url), 'utf8');
describe('app version display', () => {
it('package.json carries a valid semver version (single source of truth)', () => {
expect(pkg.version).toMatch(/^\d+\.\d+\.\d+$/);
});
it('the header sources the version from package.json instead of hardcoding it', () => {
expect(mapSource).toContain("from '../package.json'");
expect(mapSource).toContain('v{pkg.version}');
});
});