@brillout/test-e2e 0.5.13 → 0.5.14

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.js CHANGED
@@ -83,13 +83,13 @@ function add({ logSource, logText, loggedAfterExit = false, }) {
83
83
  }
84
84
  function expectLog(logText, logFilter) {
85
85
  const logsFound = logEntries.filter((logEntry) => {
86
- if ((0, strip_ansi_1.default)(logEntry.logText).includes(logText)) {
86
+ if (removeAnsi(logEntry).logText.includes(logText)) {
87
87
  logEntry.isNotFailure = true;
88
88
  return true;
89
89
  }
90
90
  return false;
91
91
  });
92
- const logsFoundWithFilter = logsFound.filter((logEntry) => logFilter?.(logEntry));
92
+ const logsFoundWithFilter = logsFound.filter((logEntry) => logFilter?.(removeAnsi(logEntry)));
93
93
  if (logsFoundWithFilter.length === 0) {
94
94
  if (logsFound.length === 0) {
95
95
  throw new Error(`The following log was expected but wasn't logged: "${logText}"`);
@@ -100,6 +100,13 @@ function expectLog(logText, logFilter) {
100
100
  }
101
101
  }
102
102
  exports.expectLog = expectLog;
103
+ function removeAnsi(logEntry) {
104
+ const logEntryWithoutAnsi = {
105
+ ...logEntry,
106
+ logText: (0, strip_ansi_1.default)(logEntry.logText),
107
+ };
108
+ return logEntryWithoutAnsi;
109
+ }
103
110
  function getTimestamp() {
104
111
  const now = new Date();
105
112
  const time = now.toTimeString().split(' ')[0];
@@ -9,7 +9,8 @@ const path_1 = __importDefault(require("path"));
9
9
  const TIMEOUTS_1 = require("./TIMEOUTS");
10
10
  let testInfo = null;
11
11
  function getCurrentTest() {
12
- (0, utils_1.assert)(testInfo);
12
+ if (!testInfo)
13
+ throw new Error('testInfo missing');
13
14
  return testInfo;
14
15
  }
15
16
  exports.getCurrentTest = getCurrentTest;
@@ -6,6 +6,10 @@ const parseCli_1 = require("./parseCli");
6
6
  const verbose = (0, parseCli_1.check)('--verbose');
7
7
  const inspect = (0, parseCli_1.check)('--inspect');
8
8
  const debugEsbuild = (0, parseCli_1.check)('--debug-esbuild');
9
+ /* Defined in ./findFiles.ts
10
+ * I don't think we use the --exclude option anymore? Can we remove it?
11
+ const exclude = check('--exclude')
12
+ */
9
13
  (0, parseCli_1.validate)();
10
14
  const cliConfig = {
11
15
  verbose,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brillout/test-e2e",
3
- "version": "0.5.13",
3
+ "version": "0.5.14",
4
4
  "bin": "./bin.js",
5
5
  "main": "./dist/index.js",
6
6
  "scripts": {