jest-extended
Advanced tools
Comparing version 1.0.0 to 1.1.0
@@ -306,2 +306,8 @@ "use strict"; | ||
}); | ||
Object.defineProperty(exports, "toEqualIgnoringWhitespace", { | ||
enumerable: true, | ||
get: function () { | ||
return _toEqualIgnoringWhitespace.toEqualIgnoringWhitespace; | ||
} | ||
}); | ||
Object.defineProperty(exports, "toHaveBeenCalledAfter", { | ||
@@ -542,2 +548,4 @@ enumerable: true, | ||
var _toThrowWithMessage = require("./toThrowWithMessage"); | ||
var _toThrowWithMessage = require("./toThrowWithMessage"); | ||
var _toEqualIgnoringWhitespace = require("./toEqualIgnoringWhitespace"); |
{ | ||
"name": "jest-extended", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "Additional Jest matchers", | ||
@@ -43,3 +43,3 @@ "main": "dist/index.js", | ||
"babel-jest-assertions": "^0.1.0", | ||
"eslint": "^7.30.0", | ||
"eslint": "^8.0.0", | ||
"eslint-config-prettier": "^8.3.0", | ||
@@ -59,2 +59,3 @@ "eslint-plugin-import": "^2.8.0", | ||
"expect": "^26.6.2", | ||
"jest-diff": "^27.2.5", | ||
"jest-get-type": "^27.0.6", | ||
@@ -61,0 +62,0 @@ "jest-matcher-utils": "^27.2.4" |
@@ -119,2 +119,3 @@ <div align="center"> | ||
- [.toIncludeMultiple([substring])](#toincludemultiplesubstring) | ||
- [.toEqualIgnoringWhitespace(string)](#toequalignoringwhitespacestring) | ||
- [Symbol](#symbol) | ||
@@ -1092,2 +1093,24 @@ - [.toBeSymbol()](#tobesymbol) | ||
#### .toEqualIgnoringWhitespace(string) | ||
Use `.toEqualIgnoringWhitespace` when checking if a `String` is equal to another `String` ignoring white-space. | ||
```js | ||
test('passes if strings are equal ignoring white-space', () => { | ||
expect('hello world').toEqualIgnoringWhitespace(` | ||
hello | ||
world | ||
`); | ||
expect('SELECT * FROM TABLE WHERE CONDITION').toEqualIgnoringWhitespace(` | ||
SELECT * FROM TABLE | ||
WHERE CONDITION | ||
`); | ||
expect('.class { cssRule: value }').not.toEqualIgnoringWhitespace(` | ||
#id { | ||
cssRule: value | ||
} | ||
`); | ||
}); | ||
``` | ||
### Symbol | ||
@@ -1094,0 +1117,0 @@ |
@@ -77,3 +77,3 @@ /// <reference types="jest" /> | ||
*/ | ||
toIncludeAllMembers(members: any[]): R; | ||
toIncludeAllPartialMembers<E = any>(members: E[]): R; | ||
@@ -412,2 +412,9 @@ /** | ||
toBeAfterOrEqualTo(date: Date): R; | ||
/** | ||
* Use `.toEqualIgnoringWhitespace` when checking if a `String` is equal (===) to given `String` ignoring white-space. | ||
* | ||
* @param {String} string | ||
*/ | ||
toEqualIgnoringWhitespace(string: string): R; | ||
} | ||
@@ -816,3 +823,10 @@ | ||
toBeAfterOrEqualTo(date: Date): any; | ||
/** | ||
* Use `.toEqualIgnoringWhitespace` when checking if a `String` is equal (===) to given `String` ignoring white-space. | ||
* | ||
* @param {String} string | ||
*/ | ||
toEqualIgnoringWhitespace(string: string): any; | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
175106
145
3459
1130
0
4
+ Addedjest-diff@^27.2.5