@brillout/test-e2e 0.5.11 → 0.5.13

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
  logErrorsAndWarnings: typeof logErrorsAndWarnings;
6
6
  clearLogs: typeof clearLogs;
7
7
  hasFailLogs: typeof hasFailLogs;
8
- logEagerly: "all" | "logs";
8
+ logEagerly: false | "all" | "logs";
9
9
  };
10
10
  export type { LogSource };
11
11
  declare type LogSource = 'stdout' | 'stderr' | 'Browser Error' | 'Browser Warning' | 'Browser Log' | 'Playwright' | 'run()' | 'run() failure' | 'test()' | 'Connection Error';
package/dist/Logs.js CHANGED
@@ -10,7 +10,7 @@ exports.Logs = {
10
10
  logErrorsAndWarnings,
11
11
  clearLogs,
12
12
  hasFailLogs,
13
- logEagerly: 'all',
13
+ logEagerly: false,
14
14
  };
15
15
  const utils_1 = require("./utils");
16
16
  const picocolors_1 = __importDefault(require("picocolors"));
@@ -123,7 +123,7 @@ function printLog(logEntry) {
123
123
  msg = msg.trim();
124
124
  let testInfoLabels = '';
125
125
  if (testInfo) {
126
- (0, utils_1.assert)(testInfo.runInfo);
126
+ (0, utils_1.assert)(testInfo.runInfo, testInfo);
127
127
  testInfoLabels = `[${testInfo.testName}][${testInfo.runInfo.cmd}]`;
128
128
  }
129
129
  console.log(`[${logTimestamp}]${testInfoLabels}[${logSourceLabel}] ${msg}`);
@@ -35,15 +35,23 @@ function applyFilter(filePathRelative, findFilter) {
35
35
  }
36
36
  const { terms, exclude } = findFilter;
37
37
  for (const term of terms) {
38
- if (!filePathRelative.includes(term) && !exclude) {
38
+ if (!matches(filePathRelative, term) && !exclude) {
39
39
  return false;
40
40
  }
41
- if (filePathRelative.includes(term) && exclude) {
41
+ if (matches(filePathRelative, term) && exclude) {
42
42
  return false;
43
43
  }
44
44
  }
45
45
  return true;
46
46
  }
47
+ function matches(str, chunk) {
48
+ str = normalize(str);
49
+ chunk = normalize(chunk);
50
+ return str.includes(chunk);
51
+ }
52
+ function normalize(p) {
53
+ return path_1.default.normalize(p);
54
+ }
47
55
  function findFilesParseCliArgs() {
48
56
  const terms = [];
49
57
  let exclude = false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brillout/test-e2e",
3
- "version": "0.5.11",
3
+ "version": "0.5.13",
4
4
  "bin": "./bin.js",
5
5
  "main": "./dist/index.js",
6
6
  "scripts": {