@brillout/test-e2e 0.5.20 → 0.5.21

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 (2) hide show
  1. package/dist/runAll.js +8 -4
  2. package/package.json +2 -2
package/dist/runAll.js CHANGED
@@ -1,4 +1,7 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
6
  exports.runAll = void 0;
4
7
  const getCurrentTest_1 = require("./getCurrentTest");
@@ -12,6 +15,7 @@ const findTestFiles_1 = require("./findTestFiles");
12
15
  const getConfig_1 = require("./getConfig");
13
16
  const logError_1 = require("./logError");
14
17
  const logTestStatus_1 = require("./logTestStatus");
18
+ const picocolors_1 = __importDefault(require("picocolors"));
15
19
  async function runAll(filter) {
16
20
  await (0, getConfig_1.loadConfig)();
17
21
  const testFiles = await (0, findTestFiles_1.findTestFiles)(filter);
@@ -25,10 +29,10 @@ async function runAll(filter) {
25
29
  // - When assert.ts calls logFail() this code block isn't run
26
30
  (0, utils_1.assert)(hasFailedTestFile && hasFailLog);
27
31
  (0, utils_1.assert)(failedTestFiles.length > 0);
28
- throw new Error([
29
- 'Following test files failed, see logs above for more information (search for [TEST_FAILURE]).',
32
+ throw new Error(picocolors_1.default.red(picocolors_1.default.bold([
33
+ 'Following test files failed, see logs above for more information (search for [TEST_FAILURE]):',
30
34
  ...failedTestFiles.map((testFile) => ` ${testFile}`),
31
- ].join('\n'));
35
+ ].join('\n'))));
32
36
  }
33
37
  }
34
38
  exports.runAll = runAll;
@@ -57,7 +61,7 @@ async function runTestFiles(testFiles, browser) {
57
61
  else {
58
62
  // Second & third attempt
59
63
  for (let i = 0; i <= 1; i++) {
60
- console.log((i === 0 ? 'SECOND' : 'THIRD') + '_ATTEMPT');
64
+ console.log('[' + (i === 0 ? 'SECOND' : 'THIRD') + '_ATTEMPT]');
61
65
  for (const testFile of failedTestFiles) {
62
66
  const { success } = await buildAndTest(testFile, browser, i === 1);
63
67
  if (success) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brillout/test-e2e",
3
- "version": "0.5.20",
3
+ "version": "0.5.21",
4
4
  "bin": "./bin.js",
5
5
  "main": "./dist/index.js",
6
6
  "scripts": {
@@ -13,7 +13,7 @@
13
13
  "release": "npm version patch && npm publish && git push && git push --tags"
14
14
  },
15
15
  "dependencies": {
16
- "@brillout/part-regex": "^0.1.2",
16
+ "@brillout/part-regex": "^0.1.3",
17
17
  "chai": "^4.3.6",
18
18
  "esbuild": "^0.16.5",
19
19
  "fast-glob": "^3.2.12",