mirror of https://github.com/garrytan/gstack.git
fix: hide the osascript raise spawn too; exclude comments from the spawn invariant
This commit is contained in:
parent
4d30746a1b
commit
77ebc1489e
|
|
@ -288,6 +288,7 @@ function raiseHeadedWindowMacOS(): void {
|
|||
nodeSpawn('osascript', ['-e', 'tell application "Google Chrome for Testing" to activate'], {
|
||||
stdio: 'ignore',
|
||||
detached: true,
|
||||
windowsHide: true,
|
||||
}).unref();
|
||||
} catch {
|
||||
// osascript missing or app not present — non-fatal
|
||||
|
|
|
|||
|
|
@ -74,7 +74,10 @@ describe('detached server spawns carry windowsHide (#1863 fold-in)', () => {
|
|||
});
|
||||
|
||||
test('every detached spawn site in cli.ts carries windowsHide:true', () => {
|
||||
const body = read(CLI);
|
||||
const body = read(CLI)
|
||||
.split('\n')
|
||||
.filter((line) => !line.trim().startsWith('//') && !line.trim().startsWith('*'))
|
||||
.join('\n');
|
||||
const detachedSpawns = body.match(/detached:\s*true/g)?.length ?? 0;
|
||||
const windowsHideFlags = body.match(/windowsHide:\s*true/g)?.length ?? 0;
|
||||
expect(windowsHideFlags).toBeGreaterThanOrEqual(detachedSpawns);
|
||||
|
|
|
|||
Loading…
Reference in New Issue