mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 10:53:59 +00:00
fix(test): resolve the macOS temp root through its symlink in the launcher and preview tests (#501)
Supersedes #301 by @VassagoDevteam, ported onto the current component layout with fixes from review. Verified before merge: format, package boundaries, unit suite, build, and the browser tracking suite; a browser harness for the change where one applies; adversarial review applied. Co-authored-by: Vassago DevTeam <[email protected]>
This commit is contained in:
1 parent
c56ef52ce3
commit
a1d0a42450
7 files changed
+99
-5
No files matched your search
@@ -6,12 +6,15 @@ import path from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { execFile } from 'node:child_process';
|
||||
import { promisify } from 'node:util';
|
||||
import { makeFixtureRoot } from './tooling/fixtureRoot.mjs';
|
||||
|
||||
const run = promisify(execFile);
|
||||
const bashTest = process.platform === 'win32' ? test.skip : test;
|
||||
|
||||
async function launch(overrides = {}, dotenv = '', omitCctv = false) {
|
||||
const root = await fs.mkdtemp(path.join(os.tmpdir(), 'gev-cctv-launch-'));
|
||||
// Physical path: the launched process reports its cwd resolved, and macOS
|
||||
// reaches the temp directory through a symlink.
|
||||
const root = await makeFixtureRoot('gev-cctv-launch-');
|
||||
try {
|
||||
await fs.mkdir(path.join(root, 'scripts'));
|
||||
await fs.mkdir(path.join(root, 'bin'));
|
||||
|
||||
Reference in new issue
Block a user