@camperaid/watest 2.5.9 → 2.6.1

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.
Files changed (34) hide show
  1. package/README.md +41 -20
  2. package/core/base.js +24 -0
  3. package/core/deps.js +68 -39
  4. package/core/meta.js +30 -0
  5. package/core/series.js +19 -2
  6. package/package.json +1 -1
  7. package/tests/base/t-contains.js +31 -3
  8. package/tests/deps/samples/unified/tests/disabled/meta.js +3 -0
  9. package/tests/deps/samples/unified/tests/disabled-parent/child/meta.js +2 -0
  10. package/tests/deps/samples/unified/tests/disabled-parent/meta.js +2 -0
  11. package/tests/deps/samples/unified/tests/meta.js +12 -1
  12. package/tests/deps/t-watest-deps.js +13 -0
  13. package/tests/deps/t-watest-grid.js +11 -2
  14. package/tests/e2e/samples/folder/package-lock.json +1 -3
  15. package/tests/e2e/samples/loader/package-lock.json +1 -3
  16. package/tests/e2e/samples/loader-mixed/package-lock.json +1 -3
  17. package/tests/e2e/samples/loader-multiple/package-lock.json +1 -3
  18. package/tests/e2e/samples/single/package-lock.json +1 -3
  19. package/tests/e2e/samples/wd-mixed/package-lock.json +1 -3
  20. package/tests/e2e/samples/wd-single/package-lock.json +1 -3
  21. package/tests/series/logging/t-failures.js +5 -0
  22. package/tests/series/logging/t-success.js +5 -0
  23. package/tests/series/logging/t-verify.js +37 -18
  24. package/tests/series/run/t-debunk-failure.js +7 -8
  25. package/tests/series/run/t-debunk-success.js +7 -8
  26. package/tests/series/run/t-nested.js +7 -10
  27. package/tests/series/run/t-verify-webdriver.js +8 -19
  28. package/tests/series/run/t-verify.js +8 -13
  29. package/tests/series/servicer/t-enabled.js +38 -0
  30. package/tests/series/servicer/t-nested-servicer-lifecycle.js +2 -7
  31. package/tests/series/servicer/t-servicer-no-services.js +2 -6
  32. package/tests/series/servicer/t-servicer-type-switching.js +2 -9
  33. package/tests/series/servicer/t-servicer.js +2 -6
  34. package/tests/series/test.js +20 -0
@@ -16,7 +16,7 @@
16
16
  },
17
17
  "../../../..": {
18
18
  "name": "@camperaid/watest",
19
- "version": "2.5.1",
19
+ "version": "2.6.0",
20
20
  "dev": true,
21
21
  "license": "MPL",
22
22
  "dependencies": {
@@ -187,7 +187,6 @@
187
187
  "version": "8.12.1",
188
188
  "dev": true,
189
189
  "license": "MIT",
190
- "peer": true,
191
190
  "bin": {
192
191
  "acorn": "bin/acorn"
193
192
  },
@@ -451,7 +450,6 @@
451
450
  "version": "9.8.0",
452
451
  "dev": true,
453
452
  "license": "MIT",
454
- "peer": true,
455
453
  "dependencies": {
456
454
  "@eslint-community/eslint-utils": "^4.2.0",
457
455
  "@eslint-community/regexpp": "^4.11.0",
@@ -16,7 +16,7 @@
16
16
  },
17
17
  "../../../..": {
18
18
  "name": "@camperaid/watest",
19
- "version": "2.5.1",
19
+ "version": "2.6.0",
20
20
  "dev": true,
21
21
  "license": "MPL",
22
22
  "dependencies": {
@@ -187,7 +187,6 @@
187
187
  "version": "8.12.1",
188
188
  "dev": true,
189
189
  "license": "MIT",
190
- "peer": true,
191
190
  "bin": {
192
191
  "acorn": "bin/acorn"
193
192
  },
@@ -451,7 +450,6 @@
451
450
  "version": "9.8.0",
452
451
  "dev": true,
453
452
  "license": "MIT",
454
- "peer": true,
455
453
  "dependencies": {
456
454
  "@eslint-community/eslint-utils": "^4.2.0",
457
455
  "@eslint-community/regexpp": "^4.11.0",
@@ -16,7 +16,7 @@
16
16
  },
17
17
  "../../../..": {
18
18
  "name": "@camperaid/watest",
19
- "version": "2.5.1",
19
+ "version": "2.6.0",
20
20
  "dev": true,
21
21
  "license": "MPL",
22
22
  "dependencies": {
@@ -187,7 +187,6 @@
187
187
  "version": "8.12.1",
188
188
  "dev": true,
189
189
  "license": "MIT",
190
- "peer": true,
191
190
  "bin": {
192
191
  "acorn": "bin/acorn"
193
192
  },
@@ -451,7 +450,6 @@
451
450
  "version": "9.8.0",
452
451
  "dev": true,
453
452
  "license": "MIT",
454
- "peer": true,
455
453
  "dependencies": {
456
454
  "@eslint-community/eslint-utils": "^4.2.0",
457
455
  "@eslint-community/regexpp": "^4.11.0",
@@ -48,9 +48,14 @@ export async function test() {
48
48
 
49
49
  const LogPipe = createMockLogPipe();
50
50
  LogPipe.suppressStdStreams();
51
+ const savedRcLogDir = settings.rc.log_dir;
52
+ const savedLogDir = settings.log_dir;
53
+ settings.rc.log_dir = '/tmp';
51
54
  try {
52
55
  await MockSeries.run([], { ts, LogPipe });
53
56
  } finally {
57
+ settings.rc.log_dir = savedRcLogDir;
58
+ settings.log_dir = savedLogDir;
54
59
  LogPipe.restoreStdStreams();
55
60
  }
56
61
 
@@ -45,9 +45,14 @@ export async function test() {
45
45
 
46
46
  const LogPipe = createMockLogPipe();
47
47
  LogPipe.suppressStdStreams();
48
+ const savedRcLogDir = settings.rc.log_dir;
49
+ const savedLogDir = settings.log_dir;
50
+ settings.rc.log_dir = '/tmp';
48
51
  try {
49
52
  await MockSeries.run([], { ts, LogPipe });
50
53
  } finally {
54
+ settings.rc.log_dir = savedRcLogDir;
55
+ settings.log_dir = savedLogDir;
51
56
  LogPipe.restoreStdStreams();
52
57
  }
53
58
 
@@ -11,8 +11,6 @@ import { settings } from '../../../core/settings.js';
11
11
  const completed_in = name => got => got.startsWith(`>${name} completed in`);
12
12
 
13
13
  export async function test() {
14
- const { webdrivers } = settings;
15
-
16
14
  let failed = false;
17
15
  const ts = {
18
16
  'tests': {
@@ -44,6 +42,12 @@ export async function test() {
44
42
 
45
43
  const LogPipe = createMockLogPipe();
46
44
  LogPipe.suppressStdStreams();
45
+ const savedRcLogDir = settings.rc.log_dir;
46
+ const savedRcWebdrivers = settings.rc.webdrivers;
47
+ const savedLogDir = settings.log_dir;
48
+ const savedWebdrivers = settings.webdrivers;
49
+ settings.rc.log_dir = '/tmp';
50
+ settings.rc.webdrivers = ['chrome', 'firefox'];
47
51
  try {
48
52
  await MockSeries.run([], {
49
53
  ts,
@@ -56,7 +60,14 @@ export async function test() {
56
60
  LogPipe.restoreStdStreams();
57
61
  }
58
62
 
59
- const chromeLogs = webdrivers.includes('chrome')
63
+ const { webdrivers: activeWebdrivers } = settings;
64
+ settings.rc.log_dir = savedRcLogDir;
65
+ settings.rc.webdrivers = savedRcWebdrivers;
66
+ settings.log_dir = savedLogDir;
67
+ settings.webdrivers = savedWebdrivers;
68
+
69
+ // Chrome first-run logs.
70
+ const chromeFirstRunLogs = activeWebdrivers.includes('chrome')
60
71
  ? [
61
72
  [
62
73
  'mac/webdriver/chrome/log',
@@ -92,23 +103,11 @@ export async function test() {
92
103
  '\x1B[38;5;243mCompleted\x1B[0m mac/webdriver/chrome/end-to-end/history',
93
104
  ],
94
105
  ],
95
- [
96
- 'mac/webdriver/chrome/end-to-end/history-verify/log',
97
- [
98
- '\x1B[38;5;99mStarted\x1B[0m mac/webdriver/chrome/end-to-end/history-verify',
99
- '!Running: mac/webdriver/chrome/end-to-end/history-verify/t_history.js, path: tests/webdriver/end-to-end/history/t_history.js',
100
- '\x1B[32mOk:\x1B[0m TestoOk',
101
- completed_in(
102
- 'mac/webdriver/chrome/end-to-end/history-verify/t_history.js',
103
- ),
104
- '\x1B[102mmac/webdriver/chrome/end-to-end/history-verify\x1B[0m Total: 1',
105
- '\x1B[38;5;243mCompleted\x1B[0m mac/webdriver/chrome/end-to-end/history-verify',
106
- ],
107
- ],
108
106
  ]
109
107
  : [];
110
108
 
111
- const firefoxLogs = webdrivers.includes('firefox')
109
+ // Firefox logs (runs after chrome first pass).
110
+ const firefoxLogs = activeWebdrivers.includes('firefox')
112
111
  ? [
113
112
  [
114
113
  'mac/webdriver/firefox/log',
@@ -142,6 +141,25 @@ export async function test() {
142
141
  ]
143
142
  : [];
144
143
 
144
+ // Chrome verify logs (runs after firefox pass).
145
+ const chromeVerifyLogs = activeWebdrivers.includes('chrome')
146
+ ? [
147
+ [
148
+ 'mac/webdriver/chrome/end-to-end/history-verify/log',
149
+ [
150
+ '\x1B[38;5;99mStarted\x1B[0m mac/webdriver/chrome/end-to-end/history-verify',
151
+ '!Running: mac/webdriver/chrome/end-to-end/history-verify/t_history.js, path: tests/webdriver/end-to-end/history/t_history.js',
152
+ '\x1B[32mOk:\x1B[0m TestoOk',
153
+ completed_in(
154
+ 'mac/webdriver/chrome/end-to-end/history-verify/t_history.js',
155
+ ),
156
+ '\x1B[102mmac/webdriver/chrome/end-to-end/history-verify\x1B[0m Total: 1',
157
+ '\x1B[38;5;243mCompleted\x1B[0m mac/webdriver/chrome/end-to-end/history-verify',
158
+ ],
159
+ ],
160
+ ]
161
+ : [];
162
+
145
163
  const buffers = LogPipe.FileStream.getLoggingBuffers();
146
164
  is(
147
165
  buffers,
@@ -163,8 +181,9 @@ export async function test() {
163
181
  '\x1B[38;5;243mCompleted\x1B[0m mac/webdriver',
164
182
  ],
165
183
  ],
166
- ...chromeLogs,
184
+ ...chromeFirstRunLogs,
167
185
  ...firefoxLogs,
186
+ ...chromeVerifyLogs,
168
187
  ],
169
188
  'logging verify',
170
189
  );
@@ -1,4 +1,9 @@
1
- import { is_test_output, MockSeries, fail } from '../test.js';
1
+ import {
2
+ is_test_output,
3
+ MockSeries,
4
+ fail,
5
+ settings_preamble,
6
+ } from '../test.js';
2
7
 
3
8
  export async function test() {
4
9
  const ts = {
@@ -18,22 +23,16 @@ export async function test() {
18
23
  };
19
24
 
20
25
  const expected_stdout = [
21
- 'Settings: no temporary storage dir',
22
- 'Settings: logging into /tmp',
23
- 'Settings: webdriver_chrome_args=[]',
24
- 'Settings: chrome webdrivers',
26
+ ...settings_preamble(),
25
27
  '\x1B[38;5;99mStarted\x1B[0m mac/',
26
28
  '\x1B[38;5;99mStarted\x1B[0m mac/unit',
27
29
  '!Running: mac/unit/t_testo.js, path: tests/unit/t_testo.js',
28
30
  '>mac/unit/t_testo.js completed in',
29
31
  '\x1B[38;5;243mCompleted\x1B[0m mac/unit',
30
- 'Logs are written to',
31
32
  '\x1B[41m\x1B[37m>mac/unit/t_testo.js\x1B[0m Failure count: 1',
32
33
  '\x1B[41m\x1B[37mFailed!\x1B[0m Passed: 0. Failed: 1',
33
34
  '\x1B[38;5;243mCompleted\x1B[0m mac/',
34
- 'Logs are written to',
35
35
  'Elapsed:',
36
- 'Logs are written to',
37
36
  'Testsuite: shutdown',
38
37
  ];
39
38
 
@@ -1,4 +1,9 @@
1
- import { is_test_output, MockSeries, success } from '../test.js';
1
+ import {
2
+ is_test_output,
3
+ MockSeries,
4
+ success,
5
+ settings_preamble,
6
+ } from '../test.js';
2
7
 
3
8
  export async function test() {
4
9
  const ts = {
@@ -24,17 +29,12 @@ export async function test() {
24
29
  '\x1B[32mOk:\x1B[0m Testo',
25
30
  '>mac/unit/t_testo.js completed in',
26
31
  '\x1B[38;5;243mCompleted\x1B[0m mac/unit',
27
- 'Logs are written to',
28
32
  '\x1B[102mSuccess!\x1B[0m Total: 1',
29
33
  '\x1B[38;5;243mCompleted\x1B[0m mac/',
30
- 'Logs are written to',
31
34
  ];
32
35
 
33
36
  const expected_stdout = [
34
- 'Settings: no temporary storage dir',
35
- 'Settings: logging into /tmp',
36
- 'Settings: webdriver_chrome_args=[]',
37
- 'Settings: chrome webdrivers',
37
+ ...settings_preamble(),
38
38
  ...expected_out_for_success,
39
39
  ...expected_out_for_success,
40
40
  ...expected_out_for_success,
@@ -42,7 +42,6 @@ export async function test() {
42
42
  ...expected_out_for_success,
43
43
 
44
44
  'Elapsed:',
45
- 'Logs are written to',
46
45
  'Testsuite: shutdown',
47
46
  ];
48
47
 
@@ -1,4 +1,9 @@
1
- import { is_test_output, MockSeries, success } from '../test.js';
1
+ import {
2
+ is_test_output,
3
+ MockSeries,
4
+ success,
5
+ settings_preamble,
6
+ } from '../test.js';
2
7
 
3
8
  export async function test() {
4
9
  const ts = {
@@ -33,10 +38,7 @@ export async function test() {
33
38
  await is_test_output(
34
39
  () => MockSeries.run([], { ts }),
35
40
  [
36
- 'Settings: no temporary storage dir',
37
- 'Settings: logging into /tmp',
38
- 'Settings: webdriver_chrome_args=[]',
39
- 'Settings: chrome webdrivers',
41
+ ...settings_preamble(),
40
42
  '\x1B[38;5;99mStarted\x1B[0m mac/',
41
43
  '\x1B[38;5;99mStarted\x1B[0m mac/unit',
42
44
  '\x1B[38;5;99mStarted\x1B[0m mac/unit/base',
@@ -44,20 +46,15 @@ export async function test() {
44
46
  '\x1B[32mOk:\x1B[0m Testo',
45
47
  '>mac/unit/base/t_testo.js completed in',
46
48
  '\x1B[38;5;243mCompleted\x1B[0m mac/unit/base',
47
- 'Logs are written to',
48
49
  '\x1B[38;5;99mStarted\x1B[0m mac/unit/core',
49
50
  '!Running: mac/unit/core/t_presto.js, path: tests/unit/core/t_presto.js',
50
51
  '\x1B[32mOk:\x1B[0m Presto',
51
52
  '>mac/unit/core/t_presto.js completed in',
52
53
  '\x1B[38;5;243mCompleted\x1B[0m mac/unit/core',
53
- 'Logs are written to',
54
54
  '\x1B[38;5;243mCompleted\x1B[0m mac/unit',
55
- 'Logs are written to',
56
55
  '\x1B[102mSuccess!\x1B[0m Total: 2',
57
56
  '\x1B[38;5;243mCompleted\x1B[0m mac/',
58
- 'Logs are written to',
59
57
  'Elapsed:',
60
- 'Logs are written to',
61
58
  'Testsuite: shutdown',
62
59
  ],
63
60
  [],
@@ -1,4 +1,10 @@
1
- import { fail, is_test_output, MockSeries, success } from '../test.js';
1
+ import {
2
+ fail,
3
+ is_test_output,
4
+ MockSeries,
5
+ success,
6
+ settings_preamble,
7
+ } from '../test.js';
2
8
 
3
9
  export async function test() {
4
10
  let testfailed = false;
@@ -31,10 +37,7 @@ export async function test() {
31
37
  };
32
38
 
33
39
  const expected_stdout = [
34
- 'Settings: no temporary storage dir',
35
- 'Settings: logging into /tmp',
36
- 'Settings: webdriver_chrome_args=[]',
37
- 'Settings: chrome webdrivers',
40
+ ...settings_preamble(),
38
41
  '\x1B[38;5;99mStarted\x1B[0m mac/',
39
42
  '\x1B[38;5;99mStarted\x1B[0m mac/webdriver',
40
43
  '\x1B[38;5;99mStarted\x1B[0m mac/webdriver/chrome',
@@ -43,11 +46,8 @@ export async function test() {
43
46
  '!Running: mac/webdriver/chrome/end-to-end/sharing/t_shared_editing.js, path: tests/webdriver/end-to-end/sharing/t_shared_editing.js',
44
47
  '>mac/webdriver/chrome/end-to-end/sharing/t_shared_editing.js completed in',
45
48
  '\x1B[38;5;243mCompleted\x1B[0m mac/webdriver/chrome/end-to-end/sharing',
46
- 'Logs are written to',
47
49
  '\x1B[38;5;243mCompleted\x1B[0m mac/webdriver/chrome/end-to-end',
48
- 'Logs are written to',
49
50
  '\x1B[38;5;243mCompleted\x1B[0m mac/webdriver/chrome',
50
- 'Logs are written to',
51
51
  '\x1B[38;5;99mStarted\x1B[0m mac/webdriver/firefox',
52
52
  '\x1B[38;5;99mStarted\x1B[0m mac/webdriver/firefox/end-to-end',
53
53
  '\x1B[38;5;99mStarted\x1B[0m mac/webdriver/firefox/end-to-end/sharing',
@@ -55,17 +55,12 @@ export async function test() {
55
55
  '\x1B[32mOk:\x1B[0m WDSuccessio',
56
56
  '>mac/webdriver/firefox/end-to-end/sharing/t_shared_editing.js completed in',
57
57
  '\x1B[38;5;243mCompleted\x1B[0m mac/webdriver/firefox/end-to-end/sharing',
58
- 'Logs are written to',
59
58
  '\x1B[38;5;243mCompleted\x1B[0m mac/webdriver/firefox/end-to-end',
60
- 'Logs are written to',
61
59
  '\x1B[38;5;243mCompleted\x1B[0m mac/webdriver/firefox',
62
- 'Logs are written to',
63
60
  '\x1B[38;5;243mCompleted\x1B[0m mac/webdriver',
64
- 'Logs are written to',
65
61
  '\x1B[41m\x1B[37m>mac/webdriver/chrome/end-to-end/sharing/t_shared_editing.js\x1B[0m Failure count: 1',
66
62
  '\x1B[41m\x1B[37mFailed!\x1B[0m Passed: 1. Failed: 1',
67
63
  '\x1B[38;5;243mCompleted\x1B[0m mac/',
68
- 'Logs are written to',
69
64
  '\x1B[38;5;99mStarted\x1B[0m mac/',
70
65
  '\x1B[38;5;99mStarted\x1B[0m mac/webdriver',
71
66
  '\x1B[38;5;99mStarted\x1B[0m mac/webdriver/chrome',
@@ -75,18 +70,12 @@ export async function test() {
75
70
  '\x1B[32mOk:\x1B[0m WDSuccessio',
76
71
  '>mac/webdriver/chrome/end-to-end/sharing-verify/t_shared_editing.js completed in',
77
72
  '\x1B[38;5;243mCompleted\x1B[0m mac/webdriver/chrome/end-to-end/sharing-verify',
78
- 'Logs are written to',
79
73
  '\x1B[38;5;243mCompleted\x1B[0m mac/webdriver/chrome/end-to-end',
80
- 'Logs are written to',
81
74
  '\x1B[38;5;243mCompleted\x1B[0m mac/webdriver/chrome',
82
- 'Logs are written to',
83
75
  '\x1B[38;5;243mCompleted\x1B[0m mac/webdriver',
84
- 'Logs are written to',
85
76
  '\x1B[102mSuccess!\x1B[0m Total: 1',
86
77
  '\x1B[38;5;243mCompleted\x1B[0m mac/',
87
- 'Logs are written to',
88
78
  'Elapsed:',
89
- 'Logs are written to',
90
79
  'Testsuite: shutdown',
91
80
  ];
92
81
 
@@ -1,4 +1,10 @@
1
- import { fail, is_test_output, MockSeries, success } from '../test.js';
1
+ import {
2
+ fail,
3
+ is_test_output,
4
+ MockSeries,
5
+ success,
6
+ settings_preamble,
7
+ } from '../test.js';
2
8
 
3
9
  export async function test() {
4
10
  const ts = {
@@ -31,10 +37,7 @@ export async function test() {
31
37
  };
32
38
 
33
39
  const expected_stdout = [
34
- 'Settings: no temporary storage dir',
35
- 'Settings: logging into /tmp',
36
- 'Settings: webdriver_chrome_args=[]',
37
- 'Settings: chrome webdrivers',
40
+ ...settings_preamble(),
38
41
  '\x1B[38;5;99mStarted\x1B[0m mac/',
39
42
  '\x1B[38;5;99mStarted\x1B[0m mac/unit',
40
43
  '\x1B[38;5;99mStarted\x1B[0m mac/unit/base',
@@ -42,33 +45,25 @@ export async function test() {
42
45
  '\x1B[32mOk:\x1B[0m Testo',
43
46
  '>mac/unit/base/t_testo.js completed in',
44
47
  '\x1B[38;5;243mCompleted\x1B[0m mac/unit/base',
45
- 'Logs are written to',
46
48
  '\x1B[38;5;99mStarted\x1B[0m mac/unit/core',
47
49
  '!Running: mac/unit/core/t_presto.js, path: tests/unit/core/t_presto.js',
48
50
  '>mac/unit/core/t_presto.js completed in',
49
51
  '\x1B[38;5;243mCompleted\x1B[0m mac/unit/core',
50
- 'Logs are written to',
51
52
  '\x1B[38;5;243mCompleted\x1B[0m mac/unit',
52
- 'Logs are written to',
53
53
  '\x1B[41m\x1B[37m>mac/unit/core/t_presto.js\x1B[0m Failure count: 1',
54
54
  '\x1B[41m\x1B[37mFailed!\x1B[0m Passed: 1. Failed: 1',
55
55
  '\x1B[38;5;243mCompleted\x1B[0m mac/',
56
- 'Logs are written to',
57
56
  '\x1B[38;5;99mStarted\x1B[0m mac/',
58
57
  '\x1B[38;5;99mStarted\x1B[0m mac/unit',
59
58
  '\x1B[38;5;99mStarted\x1B[0m mac/unit/core-verify',
60
59
  '!Running: mac/unit/core-verify/t_presto.js, path: tests/unit/core/t_presto.js',
61
60
  '>mac/unit/core-verify/t_presto.js completed in',
62
61
  '\x1B[38;5;243mCompleted\x1B[0m mac/unit/core-verify',
63
- 'Logs are written to',
64
62
  '\x1B[38;5;243mCompleted\x1B[0m mac/unit',
65
- 'Logs are written to',
66
63
  '\x1B[41m\x1B[37m>mac/unit/core-verify/t_presto.js\x1B[0m Failure count: 1',
67
64
  '\x1B[41m\x1B[37mFailed!\x1B[0m Passed: 0. Failed: 1',
68
65
  '\x1B[38;5;243mCompleted\x1B[0m mac/',
69
- 'Logs are written to',
70
66
  'Elapsed:',
71
- 'Logs are written to',
72
67
  'Testsuite: shutdown',
73
68
  ];
74
69
 
@@ -0,0 +1,38 @@
1
+ import { is_test_output } from '../../base/test.js';
2
+ import { settings_preamble } from '../test.js';
3
+ import { MockSeriesWithServicer } from './mock-servicer.js';
4
+
5
+ export async function test() {
6
+ const ts = {
7
+ 'tests': {
8
+ meta: {
9
+ enabled: () => 'false',
10
+ servicer: 'docker',
11
+ services: ['mysql', 'redis'],
12
+ },
13
+ files: ['t_example.js'],
14
+ },
15
+ 'tests/t_example.js': {
16
+ test() {
17
+ throw new Error('disabled test should not run');
18
+ },
19
+ },
20
+ };
21
+
22
+ await is_test_output(
23
+ () => MockSeriesWithServicer.run([], { ts }),
24
+ [
25
+ ...settings_preamble(),
26
+ '\x1B[38;5;99mStarted\x1B[0m mac/',
27
+ '!Running: mac, path: tests/meta.js',
28
+ '\x1B[32mOk:\x1B[0m Skipped: meta.enabled=false',
29
+ '>mac completed in',
30
+ '\x1B[102mSuccess!\x1B[0m Total: 1',
31
+ '\x1B[38;5;243mCompleted\x1B[0m mac/',
32
+ 'Elapsed:',
33
+ 'Testsuite: shutdown',
34
+ ],
35
+ [],
36
+ 'meta enabled=false skips suite without starting services',
37
+ );
38
+ }
@@ -1,4 +1,5 @@
1
1
  import { is_test_output, success } from '../../base/test.js';
2
+ import { settings_preamble } from '../test.js';
2
3
  import { MockSeriesWithServicer } from './mock-servicer.js';
3
4
 
4
5
  export async function test() {
@@ -33,10 +34,7 @@ export async function test() {
33
34
  await is_test_output(
34
35
  () => MockSeriesWithServicer.run([], { ts }),
35
36
  [
36
- 'Settings: no temporary storage dir',
37
- 'Settings: logging into /tmp',
38
- 'Settings: webdriver_chrome_args=[]',
39
- 'Settings: chrome webdrivers',
37
+ ...settings_preamble(),
40
38
  '\x1B[38;5;99mStarted\x1B[0m mac/',
41
39
 
42
40
  // Parent folder init - starts parent services
@@ -75,7 +73,6 @@ export async function test() {
75
73
  '>mac/nested/uninit completed in',
76
74
 
77
75
  '\x1B[38;5;243mCompleted\x1B[0m mac/nested',
78
- 'Logs are written to',
79
76
 
80
77
  // Parent uninit - stops parent services
81
78
  '!Running: mac/uninit, path: tests/meta.js',
@@ -86,9 +83,7 @@ export async function test() {
86
83
 
87
84
  '\x1B[102mSuccess!\x1B[0m Total: 2',
88
85
  '\x1B[38;5;243mCompleted\x1B[0m mac/',
89
- 'Logs are written to',
90
86
  'Elapsed:',
91
- 'Logs are written to',
92
87
 
93
88
  // Final shutdown should happen here with no remaining services
94
89
  'MockServicer:docker shutdown',
@@ -1,4 +1,5 @@
1
1
  import { is_test_output, success } from '../../base/test.js';
2
+ import { settings_preamble } from '../test.js';
2
3
  import { MockSeriesWithServicer } from './mock-servicer.js';
3
4
 
4
5
  /**
@@ -24,10 +25,7 @@ export async function test() {
24
25
  await is_test_output(
25
26
  () => MockSeriesWithServicer.run([], { ts }),
26
27
  [
27
- 'Settings: no temporary storage dir',
28
- 'Settings: logging into /tmp',
29
- 'Settings: webdriver_chrome_args=[]',
30
- 'Settings: chrome webdrivers',
28
+ ...settings_preamble(),
31
29
  '\x1B[38;5;99mStarted\x1B[0m mac/',
32
30
  '!Running: mac/init, path: tests/meta.js',
33
31
  'MockServicer:kubernetes init',
@@ -42,9 +40,7 @@ export async function test() {
42
40
  '>mac/uninit completed in',
43
41
  '\x1B[102mSuccess!\x1B[0m Total: 1',
44
42
  '\x1B[38;5;243mCompleted\x1B[0m mac/',
45
- 'Logs are written to',
46
43
  'Elapsed:',
47
- 'Logs are written to',
48
44
  'MockServicer:kubernetes shutdown',
49
45
  'Testsuite: shutdown',
50
46
  ],
@@ -14,6 +14,7 @@
14
14
  */
15
15
 
16
16
  import { is_test_output, success } from '../../base/test.js';
17
+ import { settings_preamble } from '../test.js';
17
18
  import { MockSeriesWithServicer } from './mock-servicer.js';
18
19
 
19
20
  export async function test() {
@@ -64,10 +65,7 @@ export async function test() {
64
65
  await is_test_output(
65
66
  () => MockSeriesWithServicer.run([], { ts }),
66
67
  [
67
- 'Settings: no temporary storage dir',
68
- 'Settings: logging into /tmp',
69
- 'Settings: webdriver_chrome_args=[]',
70
- 'Settings: chrome webdrivers',
68
+ ...settings_preamble(),
71
69
  '\x1B[38;5;99mStarted\x1B[0m mac/',
72
70
  '\x1B[38;5;99mStarted\x1B[0m mac/folder1',
73
71
 
@@ -87,7 +85,6 @@ export async function test() {
87
85
  '>mac/folder1/uninit completed in',
88
86
 
89
87
  '\x1B[38;5;243mCompleted\x1B[0m mac/folder1',
90
- 'Logs are written to',
91
88
  '\x1B[38;5;99mStarted\x1B[0m mac/folder2',
92
89
 
93
90
  // Folder 2: switch to kubernetes servicer (no shutdown - servicer handles conflicts)
@@ -106,7 +103,6 @@ export async function test() {
106
103
  '>mac/folder2/uninit completed in',
107
104
 
108
105
  '\x1B[38;5;243mCompleted\x1B[0m mac/folder2',
109
- 'Logs are written to',
110
106
  '\x1B[38;5;99mStarted\x1B[0m mac/folder3',
111
107
 
112
108
  // Folder 3: switch back to docker servicer (no shutdown - servicer handles conflicts)
@@ -125,12 +121,9 @@ export async function test() {
125
121
  '>mac/folder3/uninit completed in',
126
122
 
127
123
  '\x1B[38;5;243mCompleted\x1B[0m mac/folder3',
128
- 'Logs are written to',
129
124
  '\x1B[102mSuccess!\x1B[0m Total: 3',
130
125
  '\x1B[38;5;243mCompleted\x1B[0m mac/',
131
- 'Logs are written to',
132
126
  'Elapsed:',
133
- 'Logs are written to',
134
127
  'MockServicer:docker shutdown',
135
128
  'Testsuite: shutdown',
136
129
  ],
@@ -1,4 +1,5 @@
1
1
  import { is_test_output, success } from '../../base/test.js';
2
+ import { settings_preamble } from '../test.js';
2
3
  import { MockSeriesWithServicer } from './mock-servicer.js';
3
4
 
4
5
  export async function test() {
@@ -20,10 +21,7 @@ export async function test() {
20
21
  await is_test_output(
21
22
  () => MockSeriesWithServicer.run([], { ts }),
22
23
  [
23
- 'Settings: no temporary storage dir',
24
- 'Settings: logging into /tmp',
25
- 'Settings: webdriver_chrome_args=[]',
26
- 'Settings: chrome webdrivers',
24
+ ...settings_preamble(),
27
25
  '\x1B[38;5;99mStarted\x1B[0m mac/',
28
26
  '!Running: mac/init, path: tests/meta.js',
29
27
  'MockServicer:docker init',
@@ -40,9 +38,7 @@ export async function test() {
40
38
  '>mac/uninit completed in',
41
39
  '\x1B[102mSuccess!\x1B[0m Total: 1',
42
40
  '\x1B[38;5;243mCompleted\x1B[0m mac/',
43
- 'Logs are written to',
44
41
  'Elapsed:',
45
- 'Logs are written to',
46
42
  'MockServicer:docker shutdown',
47
43
  'Testsuite: shutdown',
48
44
  ],
@@ -1,5 +1,6 @@
1
1
  import { Core } from '../../core/core.js';
2
2
  import { Series } from '../../core/series.js';
3
+ import { settings } from '../../core/settings.js';
3
4
 
4
5
  function build_tests(tests) {
5
6
  return tests.map(t => ({
@@ -62,6 +63,25 @@ export function running_checker(name, path) {
62
63
  return `\n!Running: ${name}, path: ${path}\n\n`;
63
64
  }
64
65
 
66
+ /**
67
+ * Returns expected settings preamble lines based on current config.
68
+ */
69
+ export function settings_preamble() {
70
+ const lines = [
71
+ settings.rc.tmp_dir
72
+ ? `Settings: temporary storage dir is at ${settings.tmp_storage_dir}`
73
+ : 'Settings: no temporary storage dir',
74
+ settings.rc.log_dir
75
+ ? `Settings: logging into ${settings.rc.log_dir}`
76
+ : 'Settings: no file logging',
77
+ `Settings: webdriver_chrome_args=${JSON.stringify(settings.webdriver_chrome_args)}`,
78
+ ];
79
+ if (settings.webdrivers) {
80
+ lines.push(`Settings: ${settings.webdrivers.join(', ')} webdrivers`);
81
+ }
82
+ return lines;
83
+ }
84
+
65
85
  export function make_perform_function(tests) {
66
86
  return async () => {
67
87
  const series = new Series('tests/', {