mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-15 21:56:18 -08:00
test(packaging): harden package identity regression
Entire-Checkpoint: f957cd9849e0
This commit is contained in:
1 parent
6cdd02f010
commit
48463953db
3 files changed
+26
-10
No files matched your search
+1
-1
@@ -32,7 +32,7 @@
|
||||
"test:frontend": "nx test web",
|
||||
"test:backend": "nx test electron-backend",
|
||||
"test:unit:all": "nx run-many --target=test --all --parallel=3",
|
||||
"test:unit:ci": "nx run-many --target=test --projects=electron-backend,web,services,m3u-state,portal-stalker-data-access,portal-shared-util,playlist-shared-ui,portal-xtream-data-access,portal-xtream-feature,workspace-dashboard-data-access,components,@iptvnator/pipes --parallel=3 --output-style=static",
|
||||
"test:unit:ci": "nx run-many --target=test --projects=electron-backend,web,services,m3u-state,portal-stalker-data-access,portal-shared-util,playlist-shared-ui,portal-xtream-data-access,portal-xtream-feature,workspace-dashboard-data-access,components,@iptvnator/pipes,packaging --parallel=3 --output-style=static",
|
||||
"typecheck:web": "tsc -p apps/web/tsconfig.app.json --noEmit",
|
||||
"typecheck:backend": "tsc -p apps/electron-backend/tsconfig.app.json --noEmit",
|
||||
"typecheck:ci": "pnpm run typecheck:web && pnpm run typecheck:backend",
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
import assert from 'node:assert/strict';
|
||||
import fs from 'node:fs';
|
||||
import { dirname, join } from 'node:path';
|
||||
import test from 'node:test';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
|
||||
const currentDir = dirname(fileURLToPath(import.meta.url));
|
||||
const electronBuilderConfig = JSON.parse(
|
||||
fs.readFileSync('electron-builder.json', 'utf8')
|
||||
fs.readFileSync(
|
||||
join(currentDir, '..', '..', 'electron-builder.json'),
|
||||
'utf8'
|
||||
)
|
||||
);
|
||||
|
||||
test('Linux package identity does not expose the internal Electron backend project name', () => {
|
||||
@@ -15,12 +21,4 @@ test('Linux package identity does not expose the internal Electron backend proje
|
||||
electronBuilderConfig.linux?.desktop?.entry?.StartupWMClass,
|
||||
'iptvnator'
|
||||
);
|
||||
assert.notEqual(
|
||||
electronBuilderConfig.extraMetadata?.name,
|
||||
'electron-backend'
|
||||
);
|
||||
assert.notEqual(
|
||||
electronBuilderConfig.linux?.executableName,
|
||||
'electron-backend'
|
||||
);
|
||||
});
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"name": "packaging",
|
||||
"projectType": "library",
|
||||
"sourceRoot": "tools/packaging",
|
||||
"targets": {
|
||||
"test": {
|
||||
"executor": "nx:run-commands",
|
||||
"cache": true,
|
||||
"inputs": ["default", "{workspaceRoot}/electron-builder.json"],
|
||||
"options": {
|
||||
"command": "node --test tools/packaging/electron-package-identity.test.mjs",
|
||||
"cwd": "{workspaceRoot}"
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": ["scope:tools", "type:tool"]
|
||||
}
|
||||
Reference in new issue
Block a user