UNPKG

@stenneepro/mongoose-soft-delete

Version:
24 lines (23 loc) 858 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.expectOk = expectOk; exports.expectModifiedCount = expectModifiedCount; exports.expectMatchCount = expectMatchCount; exports.expectDeletedCount = expectDeletedCount; exports.expectUpsertedCount = expectUpsertedCount; const chai_1 = require("chai"); function expectOk(result) { (0, chai_1.expect)(result.acknowledged).to.equal(true); } function expectModifiedCount(result, count) { (0, chai_1.expect)(result.modifiedCount).to.equal(count); } function expectMatchCount(result, count) { (0, chai_1.expect)(result.matchedCount).to.equal(count); } function expectDeletedCount(result, count) { (0, chai_1.expect)(result.deletedCount).to.equal(count); } function expectUpsertedCount(result, count) { (0, chai_1.expect)(result.upsertedCount).to.equal(count); }