ci-slack-reporter 1.0.11 → 1.0.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/index.js +4 -4
- package/package.json +1 -1
package/index.js
CHANGED
@@ -26,10 +26,10 @@ let out = {};
|
|
26
26
|
const SLACK_BLOCKS_LIMIT = 50;
|
27
27
|
function splitIfBlocksLimit(obj) {
|
28
28
|
const res = [];
|
29
|
-
while (obj.attachments.blocks.length != 0) {
|
29
|
+
while (obj.attachments[0].blocks.length != 0) {
|
30
30
|
const deepClone = JSON.parse(JSON.stringify(obj))
|
31
|
-
deepClone.attachments.blocks = deepClone.attachments.blocks.slice(0, SLACK_BLOCKS_LIMIT);
|
32
|
-
ob.attachments.blocks.splice(0, SLACK_BLOCKS_LIMIT);
|
31
|
+
deepClone.attachments[0].blocks = deepClone.attachments[0].blocks.slice(0, SLACK_BLOCKS_LIMIT);
|
32
|
+
ob.attachments[0].blocks.splice(0, SLACK_BLOCKS_LIMIT);
|
33
33
|
res.push(deepClone);
|
34
34
|
}
|
35
35
|
return res;
|
@@ -41,10 +41,10 @@ class MyReporter {
|
|
41
41
|
constructor(runner) {
|
42
42
|
this._indents = 0;
|
43
43
|
const stats = runner.stats;
|
44
|
+
const filename = runner.suite?.file;
|
44
45
|
|
45
46
|
runner
|
46
47
|
.once(EVENT_RUN_BEGIN, () => {
|
47
|
-
const filename = runner.suite?.file;
|
48
48
|
console.log(`⚡runner ${filename}`);
|
49
49
|
|
50
50
|
out[filename] = {
|