mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-05-28 00:55:16 -07:00
bb6bb04c49
- create dist/scripts dir before swiftc output in prepare-build-assets - add after-pack verification that helper binary exists and is executable - remove stale Windows PS1 extra-resource entry (harmless missing-file warnings) - add tests for new verifyMacOSWindowHelper and prepare-build-assets behavior
21 lines
754 B
TypeScript
21 lines
754 B
TypeScript
import assert from 'node:assert/strict';
|
|
import { readFileSync } from 'node:fs';
|
|
import test from 'node:test';
|
|
|
|
const source = readFileSync('scripts/prepare-build-assets.mjs', 'utf8');
|
|
|
|
test('macOS helper build creates dist scripts directory before swiftc output', () => {
|
|
const buildFunctionIndex = source.indexOf('function buildMacosHelper()');
|
|
assert.notEqual(buildFunctionIndex, -1);
|
|
|
|
const swiftcIndex = source.indexOf("execFileSync('swiftc'", buildFunctionIndex);
|
|
assert.notEqual(swiftcIndex, -1);
|
|
|
|
const ensureDirIndex = source.lastIndexOf('ensureDir(scriptsOutputDir)', swiftcIndex);
|
|
|
|
assert.ok(
|
|
ensureDirIndex > buildFunctionIndex,
|
|
'buildMacosHelper must create dist/scripts before swiftc writes the helper binary',
|
|
);
|
|
});
|