node-tdd 5.2.0 → 5.2.1

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.
@@ -1,8 +1,6 @@
1
1
  import objectScan from 'object-scan';
2
2
  import cloneDeep from 'lodash.clonedeep';
3
3
 
4
- const last = (arr) => arr[arr.length - 1];
5
-
6
4
  const healer = objectScan(['**.*|*'], {
7
5
  breakFn: ({
8
6
  isMatch, depth, property, context
@@ -10,8 +8,8 @@ const healer = objectScan(['**.*|*'], {
10
8
  if (property === undefined) {
11
9
  return false;
12
10
  }
13
- context.expected[depth] = last(context.expected)?.[property];
14
- context.actual[depth] = last(context.actual)?.[property];
11
+ context.expected[depth] = context.expected[depth - 1]?.[property];
12
+ context.actual[depth] = context.actual[depth - 1]?.[property];
15
13
  return isMatch;
16
14
  },
17
15
  filterFn: ({
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "node-tdd",
3
3
  "type": "module",
4
- "version": "5.2.0",
4
+ "version": "5.2.1",
5
5
  "description": "Drop in extension for mocha to abstract commonly used test setups",
6
6
  "main": "lib/index.js",
7
7
  "scripts": {