Socket
Socket
Sign inDemoInstall

@vitest/expect

Package Overview
Dependencies
Maintainers
4
Versions
97
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vitest/expect - npm Package Compare versions

Comparing version 1.3.1 to 1.4.0

21

dist/index.js

@@ -888,6 +888,10 @@ import { getType, getColors, stringify, isObject, assertTypes } from '@vitest/utils';

def("toMatch", function(expected) {
if (typeof expected === "string")
return this.include(expected);
else
return this.match(expected);
const actual = this._obj;
return this.assert(
typeof expected === "string" ? actual.includes(expected) : actual.match(expected),
`expected #{this} to match #{exp}`,
`expected #{this} not to match #{exp}`,
expected,
actual
);
});

@@ -919,2 +923,11 @@ def("toContain", function(item) {

}
if (typeof actual === "string" && typeof item === "string") {
return this.assert(
actual.includes(item),
`expected #{this} to contain #{exp}`,
`expected #{this} not to contain #{exp}`,
item,
actual
);
}
if (actual != null && typeof actual !== "string")

@@ -921,0 +934,0 @@ utils.flag(this, "object", Array.from(actual));

8

package.json
{
"name": "@vitest/expect",
"type": "module",
"version": "1.3.1",
"version": "1.4.0",
"description": "Jest's expect matchers as a Chai plugin",

@@ -34,4 +34,4 @@ "license": "MIT",

"chai": "^4.3.10",
"@vitest/spy": "1.3.1",
"@vitest/utils": "1.3.1"
"@vitest/spy": "1.4.0",
"@vitest/utils": "1.4.0"
},

@@ -42,3 +42,3 @@ "devDependencies": {

"rollup-plugin-copy": "^3.5.0",
"@vitest/runner": "1.3.1"
"@vitest/runner": "1.4.0"
},

@@ -45,0 +45,0 @@ "scripts": {

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