Skip to content

Commit 87cc68e

Browse files
committed
fix(test): allow env var to control port behavior
1 parent bef677b commit 87cc68e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/config/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ export async function loadConfiguration<Config extends ConfigurationSchema>({
117117
// configured to auto-select
118118
const serverConfig = loaded.get().server;
119119
if (serverConfig.port === 0) {
120-
const portPromise: Promise<number> = isTest() ? getEphemeralPort() : findPort(8001);
120+
const portPromise: Promise<number> = (isTest() || process.env.TEST_RUNNER) ? getEphemeralPort() : findPort(8001);
121121
const port = await portPromise;
122122
const store = loaded.get();
123123
store.server = store.server || {};

0 commit comments

Comments
 (0)