@@ -31,7 +31,7 @@ import { spawn, type ChildProcess } from 'node:child_process';
3131import { accessSync , constants , existsSync , mkdtempSync , rmSync } from 'node:fs' ;
3232import { createServer , type Server } from 'node:http' ;
3333import { tmpdir } from 'node:os' ;
34- import { join } from 'node:path' ;
34+ import { dirname , join } from 'node:path' ;
3535import { fileURLToPath } from 'node:url' ;
3636import type { VerifyStack } from '@objectstack/verify' ;
3737import { StorageServicePlugin } from '@objectstack/service-storage' ;
@@ -45,7 +45,9 @@ import type { IPrintService } from '../../../services/service-print/src/print-se
4545const SYS = { isSystem : true } as const ;
4646const PAGE = 'showcase_invoice_document' ;
4747const APP = 'com.example.showcase' ;
48- const CONSOLE_DIST = fileURLToPath ( new URL ( '../../../console/dist' , import . meta. url ) ) ;
48+ /** The Console bundle's entry: its presence is what this file runs on. */
49+ const CONSOLE_INDEX = fileURLToPath ( new URL ( '../../../console/dist/index.html' , import . meta. url ) ) ;
50+ const CONSOLE_DIST = dirname ( CONSOLE_INDEX ) ;
4951
5052function chromiumUnderTest ( ) : string | undefined {
5153 const candidates = [
@@ -65,7 +67,7 @@ function chromiumUnderTest(): string | undefined {
6567}
6668
6769const CHROMIUM = chromiumUnderTest ( ) ;
68- const CONSOLE_BUILT = existsSync ( join ( CONSOLE_DIST , 'index.html' ) ) ;
70+ const CONSOLE_BUILT = existsSync ( CONSOLE_INDEX ) ;
6971if ( ! CHROMIUM || ! CONSOLE_BUILT ) {
7072 console . warn (
7173 `[dogfood] print-service-render.dogfood.test.ts SKIPPED: ${ ! CONSOLE_BUILT ? 'no built Console (packages/console/dist; pnpm objectui:build)' : '' } ` +
0 commit comments