Skip to content

Commit 5664971

Browse files
committed
test: ✅ fix testronaut test server command
1 parent 5292359 commit 5664971

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

apps/601-testronaut-solution/playwright-testronaut.config.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
import '@angular/compiler';
22
import { defineConfig, devices } from '@playwright/test';
33
import { withTestronautAngular } from '@testronaut/angular';
4+
import { delimiter } from 'node:path';
45

56
/**
67
* See https://playwright.dev/docs/test-configuration.
78
*/
9+
const projectName = __dirname.split(delimiter).pop();
810
export default defineConfig(
911
withTestronautAngular({
1012
configPath: __filename,
1113
testServer: {
12-
command:
13-
'nx serve 601-testronaut-solution --configuration testronaut --port {port}',
14+
command: `nx serve ${projectName} --configuration testronaut --port {port}`,
1415
},
1516
}),
1617
{

apps/601-testronaut-starter/playwright-testronaut.config.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
import '@angular/compiler';
22
import { defineConfig, devices } from '@playwright/test';
33
import { withTestronautAngular } from '@testronaut/angular';
4+
import { delimiter } from 'node:path';
45

56
/**
67
* See https://playwright.dev/docs/test-configuration.
78
*/
9+
const projectName = __dirname.split(delimiter).pop();
810
export default defineConfig(
911
withTestronautAngular({
1012
configPath: __filename,
1113
testServer: {
12-
command:
13-
'nx serve 601-testronaut-solution --configuration testronaut --port {port}',
14+
command: `nx serve ${projectName} --configuration testronaut --port {port}`,
1415
},
1516
}),
1617
{

0 commit comments

Comments
 (0)