@sprucelabs/test-utils 5.1.137 → 5.1.139

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.
@@ -119,7 +119,9 @@ const assertUtil = {
119
119
  checkDoesThrowError(matcher, err, msg) {
120
120
  var _a, _b;
121
121
  const message = (_b = (_a = err.stack) !== null && _a !== void 0 ? _a : err.message) !== null && _b !== void 0 ? _b : '**MISSING ERROR MESSAGE**';
122
- if (typeof matcher === 'string' && message.search(matcher) === -1) {
122
+ if (typeof matcher === 'string' &&
123
+ message.search(matcher) === -1 &&
124
+ !message.includes(matcher)) {
123
125
  this.fail(msg !== null && msg !== void 0 ? msg : `Expected thrown error whose message contains: \n\n${chalk_1.default.bold(matcher)}\n\nbut got back:\n\n\`${chalk_1.default.bold(message)}\`.`, '\n\nStack: ' + err.stack);
124
126
  }
125
127
  else if (matcher instanceof RegExp &&
@@ -113,7 +113,9 @@ const assertUtil = {
113
113
  checkDoesThrowError(matcher, err, msg) {
114
114
  var _a, _b;
115
115
  const message = (_b = (_a = err.stack) !== null && _a !== void 0 ? _a : err.message) !== null && _b !== void 0 ? _b : '**MISSING ERROR MESSAGE**';
116
- if (typeof matcher === 'string' && message.search(matcher) === -1) {
116
+ if (typeof matcher === 'string' &&
117
+ message.search(matcher) === -1 &&
118
+ !message.includes(matcher)) {
117
119
  this.fail(msg !== null && msg !== void 0 ? msg : `Expected thrown error whose message contains: \n\n${chalk.bold(matcher)}\n\nbut got back:\n\n\`${chalk.bold(message)}\`.`, '\n\nStack: ' + err.stack);
118
120
  }
119
121
  else if (matcher instanceof RegExp &&
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "5.1.137",
6
+ "version": "5.1.139",
7
7
  "files": [
8
8
  "build"
9
9
  ],
@@ -60,7 +60,7 @@
60
60
  "watch.tsc": "tsc -w"
61
61
  },
62
62
  "dependencies": {
63
- "@sprucelabs/error": "^6.0.198",
63
+ "@sprucelabs/error": "^6.0.199",
64
64
  "deep-equal": "^2.2.3",
65
65
  "just-clone": "^6.2.0",
66
66
  "lodash": "^4.17.21",
@@ -68,8 +68,8 @@
68
68
  "variable-diff": "^2.0.2"
69
69
  },
70
70
  "devDependencies": {
71
- "@sprucelabs/esm-postbuild": "^6.0.181",
72
- "@sprucelabs/jest-json-reporter": "^8.0.199",
71
+ "@sprucelabs/esm-postbuild": "^6.0.182",
72
+ "@sprucelabs/jest-json-reporter": "^8.0.200",
73
73
  "@sprucelabs/jest-sheets-reporter": "^2.0.20",
74
74
  "@sprucelabs/semantic-release": "^5.0.2",
75
75
  "@sprucelabs/test": "^9.0.41",