Skip to content

Commit

Permalink
Revert "feat: add objectIdEqualityTester helper"
Browse files Browse the repository at this point in the history
This reverts commit 95794ad.
  • Loading branch information
danielpza committed Aug 28, 2024
1 parent a226117 commit ea919c5
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 28 deletions.
14 changes: 0 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,17 +129,3 @@ test("my test", async ({ db, mongoClient }) => {
expect(await users.countDocuments()).toBe(1);
});
```

### Checking object id equality

If you encounter the error "Compared values have no visual difference." when comparing object ids, you'll likely need to add a [custom equality tester](https://vitest.dev/api/expect.html#expect-addequalitytesters) to vitest. This module exports a setup file for this purpose:

```js
import { defineConfig } from "vitest/config";

export default defineConfig({
test: {
setupFiles: ["vitest-mms/objectIdEqualityTester"],
},
});
```
5 changes: 0 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@
"version": "0.1.6",
"description": "mongodb-memory-server integration for vitest",
"exports": {
"./objectIdEqualityTester": {
"types": "./dist/objectIdEqualityTester.d.ts",
"require": "./dist/objectIdEqualityTester.cjs",
"import": "./dist/objectIdEqualityTester.mjs"
},
"./setupFile": {
"types": "./dist/setupFile.d.ts",
"require": "./dist/setupFile.cjs",
Expand Down
9 changes: 0 additions & 9 deletions src/objectIdEqualityTester.ts

This file was deleted.

0 comments on commit ea919c5

Please sign in to comment.