@sprucelabs/test-utils 7.2.12 → 7.2.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.
package/build/assert/assert.js
CHANGED
|
@@ -20,7 +20,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
20
20
|
const chalk_1 = __importDefault(require("chalk"));
|
|
21
21
|
const deep_equal_1 = __importDefault(require("deep-equal"));
|
|
22
22
|
const jest_matcher_utils_1 = require("jest-matcher-utils");
|
|
23
|
-
const lodash_1 = require("lodash");
|
|
23
|
+
const lodash_1 = __importDefault(require("lodash"));
|
|
24
|
+
const { cloneDeep, set } = lodash_1.default;
|
|
24
25
|
const escapeRegExp_1 = __importDefault(require("lodash/escapeRegExp"));
|
|
25
26
|
const isObjectLike_1 = __importDefault(require("lodash/isObjectLike"));
|
|
26
27
|
const ts_expect_1 = require("ts-expect");
|
|
@@ -190,8 +191,8 @@ const assert = {
|
|
|
190
191
|
// path
|
|
191
192
|
// )}\n\nin:\n\n${stringify(haystack)}`
|
|
192
193
|
msg = `Expected:\n\n${chalk_1.default.green(stringify(needle[path]))}\n\nbut found:\n\n${chalk_1.default.red(stringify(actual))}\n\nat key:\n\n${stringify(path)}`;
|
|
193
|
-
let clonedHaystack =
|
|
194
|
-
clonedHaystack =
|
|
194
|
+
let clonedHaystack = cloneDeep(haystack);
|
|
195
|
+
clonedHaystack = set(clonedHaystack, path, `${actual} -> ${expected}`);
|
|
195
196
|
msg += `\n\nHere is the change:\n\n${stringify(clonedHaystack)}`;
|
|
196
197
|
}
|
|
197
198
|
if (typeof expected === 'string' &&
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import chalk from 'chalk';
|
|
2
2
|
import deepEqual from 'deep-equal';
|
|
3
3
|
import { printDiffOrStringify } from 'jest-matcher-utils';
|
|
4
|
-
import
|
|
4
|
+
import lodash from 'lodash';
|
|
5
|
+
const { cloneDeep, set } = lodash;
|
|
5
6
|
import escapeRegExp from 'lodash/escapeRegExp.js';
|
|
6
7
|
import isObjectLike from 'lodash/isObjectLike.js';
|
|
7
8
|
import { expectType } from 'ts-expect';
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "7.2.
|
|
6
|
+
"version": "7.2.14",
|
|
7
7
|
"files": [
|
|
8
8
|
"build"
|
|
9
9
|
],
|
|
@@ -85,14 +85,14 @@
|
|
|
85
85
|
"@sprucelabs/jest-json-reporter": "^10.0.25",
|
|
86
86
|
"@sprucelabs/jest-sheets-reporter": "^2.0.20",
|
|
87
87
|
"@sprucelabs/semantic-release": "^6.0.0",
|
|
88
|
-
"@sprucelabs/test": "^11.1.
|
|
88
|
+
"@sprucelabs/test": "^11.1.5",
|
|
89
89
|
"@types/deep-equal": "^1.0.4",
|
|
90
90
|
"@types/jest": "^30.0.0",
|
|
91
91
|
"@types/lodash": "^4.17.23",
|
|
92
|
-
"@types/node": "^25.
|
|
92
|
+
"@types/node": "^25.3.0",
|
|
93
93
|
"chokidar-cli": "^3.0.0",
|
|
94
|
-
"eslint": "^10.0.
|
|
95
|
-
"eslint-config-spruce": "^11.2.
|
|
94
|
+
"eslint": "^10.0.1",
|
|
95
|
+
"eslint-config-spruce": "^11.2.34",
|
|
96
96
|
"jest": "^30.2.0",
|
|
97
97
|
"jest-circus": "^30.2.0",
|
|
98
98
|
"prettier": "^3.8.1",
|