refactor: Stamp build information in as "defines" (#2654)

This commit is contained in:
Dermot Duffy
2026-08-03 22:36:32 -07:00
committed by GitHub
parent 2d124fe3cd
commit 06bcfd58ba
13 changed files with 133 additions and 148 deletions
+18
View File
@@ -0,0 +1,18 @@
import { describe, expect, it } from 'vitest';
import { getGitInfo, getReleaseVersion } from '../../src/utils/build-info';
// As these are running as tests, the won't be build substitutes so this only
// tests default/fallback values.
describe('getReleaseVersion', () => {
it('should report an unbuilt card as a development one', () => {
expect(getReleaseVersion()).toBe('dev');
});
});
describe('getGitInfo', () => {
it('should report nothing about an unbuilt card', () => {
expect(getGitInfo()).toEqual({});
});
});