ci-slack-reporter 1.0.12 → 1.0.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.
Files changed (2) hide show
  1. package/index.js +3 -3
  2. 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
+ obj.attachments[0].blocks.splice(0, SLACK_BLOCKS_LIMIT);
33
33
  res.push(deepClone);
34
34
  }
35
35
  return res;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ci-slack-reporter",
3
- "version": "1.0.12",
3
+ "version": "1.0.14",
4
4
  "description": "Mocha/Cypress reporter to post tests results directly to Slack",
5
5
  "main": "index.js",
6
6
  "scripts": {