@vitest/expect 2.1.0 → 2.1.2

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.
Files changed (2) hide show
  1. package/dist/index.js +7 -6
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -1239,12 +1239,13 @@ const JestChaiExpect = (chai, utils) => {
1239
1239
  return this.be.null;
1240
1240
  });
1241
1241
  def("toBeDefined", function() {
1242
- const negate = utils.flag(this, "negate");
1243
- utils.flag(this, "negate", false);
1244
- if (negate) {
1245
- return this.be.undefined;
1246
- }
1247
- return this.not.be.undefined;
1242
+ const obj = utils.flag(this, "object");
1243
+ this.assert(
1244
+ typeof obj !== "undefined",
1245
+ "expected #{this} to be defined",
1246
+ "expected #{this} to be undefined",
1247
+ obj
1248
+ );
1248
1249
  });
1249
1250
  def(
1250
1251
  "toBeTypeOf",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vitest/expect",
3
3
  "type": "module",
4
- "version": "2.1.0",
4
+ "version": "2.1.2",
5
5
  "description": "Jest's expect matchers as a Chai plugin",
6
6
  "license": "MIT",
7
7
  "funding": "https://opencollective.com/vitest",
@@ -32,13 +32,13 @@
32
32
  "dependencies": {
33
33
  "chai": "^5.1.1",
34
34
  "tinyrainbow": "^1.2.0",
35
- "@vitest/spy": "2.1.0",
36
- "@vitest/utils": "2.1.0"
35
+ "@vitest/spy": "2.1.2",
36
+ "@vitest/utils": "2.1.2"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@types/chai": "4.3.6",
40
40
  "rollup-plugin-copy": "^3.5.0",
41
- "@vitest/runner": "2.1.0"
41
+ "@vitest/runner": "2.1.2"
42
42
  },
43
43
  "scripts": {
44
44
  "build": "rimraf dist && rollup -c",