@kinora/reporter 0.13.0 → 0.14.0
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/index.mjs +5 -18
- package/package.json +7 -7
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { readFileSync, statSync } from "node:fs";
|
|
2
2
|
import { readFile } from "node:fs/promises";
|
|
3
3
|
import process from "node:process";
|
|
4
|
-
import { DEFAULT_KINORA_URL, DEFAULT_UPLOAD_ATTACHMENTS, IngestError, a11yFromScans, createIngestClient, describeRetry, detectCiEnv, effectiveAttachments, flakyTestsOf,
|
|
4
|
+
import { DEFAULT_KINORA_URL, DEFAULT_UPLOAD_ATTACHMENTS, IngestError, a11yFromScans, artifactsToUpload, createIngestClient, describeRetry, detectCiEnv, effectiveAttachments, flakyTestsOf, makeTestKey, parseAxeScan, postPrComment, resolvePrContext, resolveShardGroup, uploadArtifacts } from "@kinora/core";
|
|
5
5
|
// src/index.ts
|
|
6
6
|
function identity(test) {
|
|
7
7
|
let file = "";
|
|
@@ -141,23 +141,10 @@ var KinoraReporter = class {
|
|
|
141
141
|
onRetry: (info) => console.warn(`[kinora] ${describeRetry(info)}`)
|
|
142
142
|
});
|
|
143
143
|
const res = await client.uploadRun(payload);
|
|
144
|
-
const
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
try {
|
|
149
|
-
await client.uploadArtifact({
|
|
150
|
-
runId: res.runId,
|
|
151
|
-
testKey: t.testKey,
|
|
152
|
-
name: a.name,
|
|
153
|
-
contentType: a.contentType,
|
|
154
|
-
body: await readFile(a.path)
|
|
155
|
-
});
|
|
156
|
-
artifacts++;
|
|
157
|
-
} catch (err) {
|
|
158
|
-
console.warn(`[kinora] ${a.name} upload failed for ${t.testKey}:`, err instanceof Error ? err.message : err);
|
|
159
|
-
}
|
|
160
|
-
}
|
|
144
|
+
const artifacts = await uploadArtifacts(client, res.runId, artifactsToUpload(tests, this.options.uploadAttachments ?? DEFAULT_UPLOAD_ATTACHMENTS), {
|
|
145
|
+
read: readFile,
|
|
146
|
+
onFailed: (a, err) => console.warn(`[kinora] ${a.name} upload failed for ${a.testKey}:`, err instanceof Error ? err.message : err)
|
|
147
|
+
});
|
|
161
148
|
console.log(`[kinora] uploaded ${res.tests} tests + ${artifacts} artifacts (run ${res.runId}${res.shardProgress ? `, ${res.shardProgress.landed} of ${res.shardProgress.total} shards` : ""})`);
|
|
162
149
|
if (res.incident) console.warn(`[kinora] environment incident, not counted: ${res.incident.reason}`);
|
|
163
150
|
await this.maybePostPrComment(payload, res);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kinora/reporter",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.14.0",
|
|
5
5
|
"description": "Playwright reporter that uploads test results to a kinora server",
|
|
6
6
|
"author": "Joris Gallot",
|
|
7
7
|
"license": "MIT",
|
|
@@ -45,16 +45,16 @@
|
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@kinora/core": "0.
|
|
48
|
+
"@kinora/core": "0.16.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@axe-core/playwright": "^4.14.0",
|
|
52
|
-
"@playwright/test": "^1.
|
|
53
|
-
"@types/node": "^26.6.
|
|
54
|
-
"@vitest/coverage-v8": "^5.0
|
|
55
|
-
"tsdown": "^0.23.
|
|
52
|
+
"@playwright/test": "^1.65.0",
|
|
53
|
+
"@types/node": "^26.6.6",
|
|
54
|
+
"@vitest/coverage-v8": "^5.1.0",
|
|
55
|
+
"tsdown": "^0.23.7",
|
|
56
56
|
"typescript": "~6.0.3",
|
|
57
|
-
"vitest": "^5.0
|
|
57
|
+
"vitest": "^5.1.0"
|
|
58
58
|
},
|
|
59
59
|
"scripts": {
|
|
60
60
|
"build": "tsdown",
|