@bigbinary/neeto-playwright-reporter 1.4.0 → 1.4.2
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/index.cjs.js +21 -12
- package/index.cjs.js.map +1 -1
- package/index.js +19 -10
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -2,13 +2,13 @@ import crypto from 'crypto';
|
|
|
2
2
|
import { camelToSnakeCase, keysToSnakeCase, keysToCamelCase } from '@bigbinary/neeto-cist';
|
|
3
3
|
import require$$1, { TextEncoder } from 'util';
|
|
4
4
|
import stream, { Readable } from 'stream';
|
|
5
|
-
import
|
|
5
|
+
import path$1 from 'path';
|
|
6
6
|
import require$$3 from 'http';
|
|
7
7
|
import require$$4 from 'https';
|
|
8
8
|
import require$$0$1 from 'url';
|
|
9
9
|
import require$$6, { readFileSync } from 'fs';
|
|
10
10
|
import require$$4$1 from 'assert';
|
|
11
|
-
import require$$1$
|
|
11
|
+
import require$$1$1 from 'tty';
|
|
12
12
|
import require$$0$2 from 'os';
|
|
13
13
|
import zlib from 'zlib';
|
|
14
14
|
import EventEmitter from 'events';
|
|
@@ -11987,7 +11987,7 @@ var require$$0 = {
|
|
|
11987
11987
|
*/
|
|
11988
11988
|
|
|
11989
11989
|
var db = mimeDb.exports;
|
|
11990
|
-
var extname =
|
|
11990
|
+
var extname = path$1.extname;
|
|
11991
11991
|
|
|
11992
11992
|
/**
|
|
11993
11993
|
* Module variables.
|
|
@@ -12558,7 +12558,7 @@ var populate$1 = function(dst, src) {
|
|
|
12558
12558
|
|
|
12559
12559
|
var CombinedStream = combined_stream;
|
|
12560
12560
|
var util = require$$1;
|
|
12561
|
-
var path =
|
|
12561
|
+
var path = path$1;
|
|
12562
12562
|
var http$1 = require$$3;
|
|
12563
12563
|
var https$1 = require$$4;
|
|
12564
12564
|
var parseUrl$2 = require$$0$1.parse;
|
|
@@ -15096,7 +15096,7 @@ function requireSupportsColor () {
|
|
|
15096
15096
|
if (hasRequiredSupportsColor) return supportsColor_1;
|
|
15097
15097
|
hasRequiredSupportsColor = 1;
|
|
15098
15098
|
const os = require$$0$2;
|
|
15099
|
-
const tty = require$$1$
|
|
15099
|
+
const tty = require$$1$1;
|
|
15100
15100
|
const hasFlag = requireHasFlag();
|
|
15101
15101
|
|
|
15102
15102
|
const {env} = process;
|
|
@@ -15242,7 +15242,7 @@ function requireNode () {
|
|
|
15242
15242
|
if (hasRequiredNode) return node.exports;
|
|
15243
15243
|
hasRequiredNode = 1;
|
|
15244
15244
|
(function (module, exports) {
|
|
15245
|
-
const tty = require$$1$
|
|
15245
|
+
const tty = require$$1$1;
|
|
15246
15246
|
const util = require$$1;
|
|
15247
15247
|
|
|
15248
15248
|
/**
|
|
@@ -18584,7 +18584,10 @@ const executeCommandLine = ({ command, messageOnError, shouldThrowError = false,
|
|
|
18584
18584
|
}
|
|
18585
18585
|
};
|
|
18586
18586
|
|
|
18587
|
-
const getDescribePath = ({ titlePath, title, project,
|
|
18587
|
+
const getDescribePath = ({ titlePath, title, project, rootDir, file, }) => titlePath.filter((item, index) => index !== 0 &&
|
|
18588
|
+
item !== title &&
|
|
18589
|
+
item !== project &&
|
|
18590
|
+
item !== path$1.relative(rootDir, file));
|
|
18588
18591
|
const getCurrentCommitSha = () => executeCommandLine({
|
|
18589
18592
|
command: "git rev-parse HEAD",
|
|
18590
18593
|
messageOnError: ERRORS.onBegin.failedToGetCommitSha,
|
|
@@ -18606,8 +18609,14 @@ const getTestData = (test, rootDir) => {
|
|
|
18606
18609
|
const { title, parent, location: { file }, } = test;
|
|
18607
18610
|
const titlePath = test.titlePath();
|
|
18608
18611
|
const project = (_a = parent.project()) === null || _a === void 0 ? void 0 : _a.name;
|
|
18609
|
-
const spec =
|
|
18610
|
-
const describe = getDescribePath({
|
|
18612
|
+
const spec = path$1.relative(rootDir, file);
|
|
18613
|
+
const describe = getDescribePath({
|
|
18614
|
+
titlePath,
|
|
18615
|
+
title,
|
|
18616
|
+
project,
|
|
18617
|
+
rootDir,
|
|
18618
|
+
file,
|
|
18619
|
+
});
|
|
18611
18620
|
const historyId = generateHistoryId(project !== null && project !== void 0 ? project : "", spec, describe, title);
|
|
18612
18621
|
return { title, describe, project, spec, historyId };
|
|
18613
18622
|
};
|
|
@@ -18639,7 +18648,7 @@ const onBegin = async (self, config, rootSuite) => {
|
|
|
18639
18648
|
branch: getCurrentBranch(),
|
|
18640
18649
|
tags: typeof self.tags === "string" ? self.tags.split(",") : self.tags,
|
|
18641
18650
|
ciBuildId: self.ciBuildId,
|
|
18642
|
-
configuration: config,
|
|
18651
|
+
configuration: { ...config, baseDir: process.cwd() },
|
|
18643
18652
|
shards: createShardObject({ currentShard }),
|
|
18644
18653
|
};
|
|
18645
18654
|
await runsApi.create(runDetails);
|