Files
advanced-camera-card/tests/utils/build-info.test.ts
T

29 lines
736 B
TypeScript

import { describe, expect, it } from 'vitest';
import {
getGitInfo,
getReleaseVersion,
getUnreleasedBuildDate,
} 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({});
});
});
describe('getUnreleasedBuildDate', () => {
it('should report no build date for an unbuilt card', () => {
expect(getUnreleasedBuildDate()).toBeNull();
});
});