Skip to content

Commit 5f66e49

Browse files
committed
test: ✅ upgrade testronaut
1 parent 1737ccc commit 5f66e49

File tree

4 files changed

+18
-62
lines changed

4 files changed

+18
-62
lines changed

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

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
import '@angular/compiler';
21
import { defineConfig, devices } from '@playwright/test';
3-
import { withTestronautAngular as originalWithTestronautAngular } from '@testronaut/angular';
2+
import { withTestronautAngular } from '@testronaut/angular';
43
import { dirname, sep } from 'node:path';
54
import { fileURLToPath } from 'node:url';
65

@@ -42,25 +41,3 @@ export default defineConfig(
4241
],
4342
},
4443
);
45-
46-
/**
47-
* This is a workaround to allow the test server to be reused when running
48-
* multiple Playwright instances.
49-
*
50-
* The next Testronaut version will automatically pick an available port instead.
51-
* Cf. https://github.com/testronaut/testronaut/pull/70
52-
*/
53-
function withTestronautAngular(
54-
...args: Parameters<typeof originalWithTestronautAngular>
55-
) {
56-
const config = originalWithTestronautAngular(...args);
57-
return {
58-
...config,
59-
webServer: config.webServer
60-
? {
61-
...config.webServer,
62-
reuseExistingServer: true,
63-
}
64-
: undefined,
65-
};
66-
}

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

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
import '@angular/compiler';
21
import { defineConfig, devices } from '@playwright/test';
3-
import { withTestronautAngular as originalWithTestronautAngular } from '@testronaut/angular';
2+
import { withTestronautAngular } from '@testronaut/angular';
43
import { dirname, sep } from 'node:path';
54
import { fileURLToPath } from 'node:url';
65

@@ -42,25 +41,3 @@ export default defineConfig(
4241
],
4342
},
4443
);
45-
46-
/**
47-
* This is a workaround to allow the test server to be reused when running
48-
* multiple Playwright instances.
49-
*
50-
* The next Testronaut version will automatically pick an available port instead.
51-
* Cf. https://github.com/testronaut/testronaut/pull/70
52-
*/
53-
function withTestronautAngular(
54-
...args: Parameters<typeof originalWithTestronautAngular>
55-
) {
56-
const config = originalWithTestronautAngular(...args);
57-
return {
58-
...config,
59-
webServer: config.webServer
60-
? {
61-
...config.webServer,
62-
reuseExistingServer: true,
63-
}
64-
: undefined,
65-
};
66-
}

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@
5454
"@testing-library/dom": "10.4.1",
5555
"@testing-library/jest-dom": "6.8.0",
5656
"@testing-library/user-event": "14.6.1",
57-
"@testronaut/angular": "0.0.6",
58-
"@testronaut/core": "0.0.6",
57+
"@testronaut/angular": "0.0.9",
58+
"@testronaut/core": "0.0.9",
5959
"@types/node": "20.19.9",
6060
"@typescript-eslint/utils": "^8.40.0",
6161
"@vitest/browser": "3.2.4",

pnpm-lock.yaml

Lines changed: 14 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)