feat(release): 1.0.0

This commit is contained in:
2023-10-20 08:29:12 +00:00
commit 954c48296b
58 changed files with 11650 additions and 0 deletions

20
tests/Remove.Test.ts Normal file
View File

@@ -0,0 +1,20 @@
import { Collection } from "../src/Collection.js";
import { MemoryStorage } from "../src/Databases/MemoryDb.Storage.js";
import { RemoveResult } from "../src/index.js";
import { getUsers } from "./Users.Mock.js";
/*
|--------------------------------------------------------------------------------
| Unit Tests
|--------------------------------------------------------------------------------
*/
describe("Storage Remove", () => {
it("should successfully delete document", async () => {
const collection = new Collection("users", new MemoryStorage("users"));
const users = getUsers();
await collection.insertMany(users);
expect(await collection.remove({ id: "user-1" })).toEqual(new RemoveResult(1));
collection.storage.destroy();
});
});