mirror of
https://github.com/Syngnat/GoNavi.git
synced 2026-08-15 19:24:23 +08:00
- 基于 TypeScript AST 精确识别 readFileSync 派生变量及其断言,仅删除不改写保留代码 - 断言全为源码文本的 it() 块整块移除,混合块中只剔除单条源码断言 - 清理随之失效的变量声明、空 it()/describe() 与无用 import,6 个文件因无用例残留而删除 - 累计移除 1283 处代码区间、8270 行,守卫基线由 130 条收敛至 12 条 - 全量测试失败集合无新增,TabManager 悬浮信息用例的 CRLF 误报一并消除 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
22 lines
784 B
TypeScript
22 lines
784 B
TypeScript
import { describe, expect, it } from 'vitest';
|
|
|
|
import { resolveAboutDisplayVersion } from './appVersionDisplay';
|
|
|
|
describe('resolveAboutDisplayVersion', () => {
|
|
it('shows fixed dev version for development build', () => {
|
|
expect(resolveAboutDisplayVersion('development', '0.6.5')).toBe('0.0.1-dev');
|
|
});
|
|
|
|
it('shows fixed dev version for wails dev build type', () => {
|
|
expect(resolveAboutDisplayVersion('dev', '0.6.5')).toBe('0.0.1-dev');
|
|
});
|
|
|
|
it('keeps real version for non-development builds', () => {
|
|
expect(resolveAboutDisplayVersion('production', '0.6.5')).toBe('0.6.5');
|
|
});
|
|
|
|
it('falls back to unknown when version is empty outside development', () => {
|
|
expect(resolveAboutDisplayVersion('production', '', 'T:unknown')).toBe('T:unknown');
|
|
});
|
|
});
|