@brillout/test-e2e 0.4.5 → 0.4.6

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.
package/dist/Logs.d.ts CHANGED
@@ -5,7 +5,7 @@ export declare const Logs: {
5
5
  logErrors: typeof logErrors;
6
6
  clearLogs: typeof clearLogs;
7
7
  hasErrorLogs: typeof hasErrorLogs;
8
- flushEagerly: boolean;
8
+ logEagerly: boolean;
9
9
  };
10
10
  declare type LogSource = 'stdout' | 'stderr' | 'Browser Error' | 'Browser Warning' | 'Browser Log' | 'Playwright' | 'run()' | 'run() failure' | 'test()' | 'Connection Error';
11
11
  declare type LogEntry = {
package/dist/Logs.js CHANGED
@@ -10,7 +10,7 @@ exports.Logs = {
10
10
  logErrors,
11
11
  clearLogs,
12
12
  hasErrorLogs,
13
- flushEagerly: false,
13
+ logEagerly: false,
14
14
  };
15
15
  const utils_1 = require("./utils");
16
16
  const picocolors_1 = __importDefault(require("picocolors"));
@@ -74,8 +74,8 @@ function add({ logSource, logText }) {
74
74
  isNotFailure,
75
75
  };
76
76
  logEntries.push(logEntry);
77
- if (exports.Logs.flushEagerly) {
78
- flushLogs();
77
+ if (exports.Logs.logEagerly) {
78
+ printLog(logEntry);
79
79
  }
80
80
  }
81
81
  function expectError(logFilter) {
package/dist/setup.js CHANGED
@@ -51,7 +51,7 @@ additionalTimeout = 0, serverIsReadyMessage, serverIsReadyDelay = 1000, inspect
51
51
  serverUrl,
52
52
  };
53
53
  if (inspect) {
54
- Logs_1.Logs.flushEagerly = true;
54
+ Logs_1.Logs.logEagerly = true;
55
55
  }
56
56
  let runProcess = null;
57
57
  testInfo.startServer = async () => {
@@ -502,6 +502,7 @@ function logDebugInfo(data) {
502
502
  console.log('testInfo.testFile', testInfo.testFile);
503
503
  console.log('testInfo.testName', testInfo.testName);
504
504
  console.log('data', data);
505
+ console.log('data.length', data.length);
505
506
  console.log('process.platform', process.platform);
506
507
  console.log('^^^^^ DEBUG INFO ^^^^^');
507
508
  }
@@ -4,5 +4,6 @@ exports.cliConfig = void 0;
4
4
  const cliArgs = process.argv.slice(2);
5
5
  exports.cliConfig = {
6
6
  debugEsbuild: cliArgs.includes('--debug-esbuild'),
7
- inspect: cliArgs.includes('--inspect'),
7
+ // To inspect a specific test: `$ touch examples/some-example/INSPECT`
8
+ inspect: cliArgs.includes('--inspect') || !!process.env.TEST_INSPECT,
8
9
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brillout/test-e2e",
3
- "version": "0.4.5",
3
+ "version": "0.4.6",
4
4
  "bin": "./bin.js",
5
5
  "main": "./dist/index.js",
6
6
  "scripts": {