فینورا پرو - سامانه جامع حسابداری و صدور فاکتور

test(A07): assert consistent UI/runtime/installer version

davoodmehraban89 committed Oct 14, 2026 at 23:19 UTC aaec91cccd37395c9b40f9f2635fbcadcde7d173
1 file changed +17
tests/app-version-consistency.test.mjs new
+17
@@ -0,0 +1,17 @@
1 +import test from 'node:test';
2 +import assert from 'node:assert/strict';
3 +import { readFileSync } from 'node:fs';
4 +
5 +const read = file => readFileSync(new URL('../' + file, import.meta.url), 'utf8');
6 +const manifest = JSON.parse(read('package.json'));
7 +const tauri = JSON.parse(read('src-tauri/tauri.conf.json'));
8 +const entry = read('src/main.js');
9 +const html = read('index.html');
10 +
11 +test('A07: desktop and application version use a single package manifest', () => {
12 + assert.equal(manifest.version, tauri.version);
13 + assert.match(entry, /version: appPackage\.version/);
14 + assert.doesNotMatch(entry, /version:\s*['"]1\.1\.1['"]/);
15 + assert.match(html, /id="appVersionLabel"/);
16 + assert.match(entry, /visibleVersion\.textContent\s*=\s*'نسخه '\s*\+\s*FINORA\.version/);
17 +});