Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jest-extended

Package Overview
Dependencies
Maintainers
2
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jest-extended - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

dist/matchers/toEqualIgnoringWhitespace/index.js

10

dist/matchers/index.js

@@ -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");

5

package.json
{
"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;
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc