@tramvai/test-pw 6.68.6 → 6.77.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,6 +4,8 @@ import type { AppTarget as _AppTarget } from './types';
4
4
  export type AppServerType = {
5
5
  port: number;
6
6
  staticPort: number;
7
+ stdout: string[];
8
+ stderr: string[];
7
9
  };
8
10
  export type AppServerOptionsType = {
9
11
  env?: Record<string, string>;
@@ -50,10 +50,21 @@ const appServerFixture = [
50
50
  NODE_ENV: 'production',
51
51
  CACHE_WARMUP_DISABLED: 'true',
52
52
  DEV_STATIC: 'true',
53
+ DANGEROUS_UNSAFE_ENV_FILES: 'true',
53
54
  ASSETS_PREFIX: `http://localhost:${staticPort}/${clientOutput}/`,
54
55
  ...env,
55
56
  },
56
57
  });
58
+ const stdout = [];
59
+ const stderr = [];
60
+ server.stdout?.on('data', (chunk) => {
61
+ const log = chunk.toString();
62
+ stdout.push(...log.split('\n'));
63
+ });
64
+ server.stderr?.on('data', (chunk) => {
65
+ const log = chunk.toString();
66
+ stderr.push(...log.split('\n'));
67
+ });
57
68
  // playwright can only collect string-form stdio into the test report
58
69
  // https://github.com/microsoft/playwright/issues/23993
59
70
  server.stdout?.setEncoding('utf-8');
@@ -74,6 +85,8 @@ const appServerFixture = [
74
85
  const app = {
75
86
  port,
76
87
  staticPort,
88
+ stdout,
89
+ stderr,
77
90
  };
78
91
  await use(app);
79
92
  server.kill('SIGKILL');
@@ -61,10 +61,21 @@ const appServerFixture = [
61
61
  NODE_ENV: 'production',
62
62
  CACHE_WARMUP_DISABLED: 'true',
63
63
  DEV_STATIC: 'true',
64
+ DANGEROUS_UNSAFE_ENV_FILES: 'true',
64
65
  ASSETS_PREFIX: `http://localhost:${staticPort}/${clientOutput}/`,
65
66
  ...env,
66
67
  },
67
68
  });
69
+ const stdout = [];
70
+ const stderr = [];
71
+ server.stdout?.on('data', (chunk) => {
72
+ const log = chunk.toString();
73
+ stdout.push(...log.split('\n'));
74
+ });
75
+ server.stderr?.on('data', (chunk) => {
76
+ const log = chunk.toString();
77
+ stderr.push(...log.split('\n'));
78
+ });
68
79
  // playwright can only collect string-form stdio into the test report
69
80
  // https://github.com/microsoft/playwright/issues/23993
70
81
  server.stdout?.setEncoding('utf-8');
@@ -85,6 +96,8 @@ const appServerFixture = [
85
96
  const app = {
86
97
  port,
87
98
  staticPort,
99
+ stdout,
100
+ stderr,
88
101
  };
89
102
  await use(app);
90
103
  server.kill('SIGKILL');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tramvai/test-pw",
3
- "version": "6.68.6",
3
+ "version": "6.77.2",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
@@ -18,8 +18,8 @@
18
18
  },
19
19
  "dependencies": {
20
20
  "@tinkoff/utils": "^2.1.2",
21
- "@tramvai/test-integration": "6.68.6",
22
- "@tramvai/tokens-router": "6.68.6",
21
+ "@tramvai/test-integration": "6.77.2",
22
+ "@tramvai/tokens-router": "6.77.2",
23
23
  "console-with-style": "^1.1.0",
24
24
  "env-ci": "^5.0.2",
25
25
  "execa": "^5.1.1",
@@ -33,7 +33,7 @@
33
33
  },
34
34
  "devDependencies": {
35
35
  "@playwright/test": "1.54.1",
36
- "@tramvai/cli": "6.68.6",
36
+ "@tramvai/cli": "6.77.2",
37
37
  "@types/env-ci": "^3.1.0",
38
38
  "@types/supports-color": "^8.1.1",
39
39
  "@types/wait-on": "^5.2.0",