Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion guardrails.suppressions.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"rules": {
"@typescript-eslint/no-unused-expressions": 1,
"@typescript-eslint/no-unused-expressions": 0,
"anti-slop/no-chained-type-assertions": 1,
"typescript/no-unnecessary-type-parameters": 1,
"typescript/no-unused-vars": 1,
Expand Down
9 changes: 4 additions & 5 deletions src/tests/merge_operations.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-unused-expressions */
import { expect } from "chai";
import { Schema } from "..";

Expand Down Expand Up @@ -100,7 +99,7 @@ async function MergeCustomerWithUserData() {
const antoineOrder = result.find(
(doc) => doc.customer?.email === "antoine@example.com",
);
expect(antoineOrder).to.not.be.undefined;
expect(antoineOrder).to.not.equal(undefined);
expect(antoineOrder?.orderSummary.totalAmount).to.equal(1250);
}

Expand Down Expand Up @@ -128,7 +127,7 @@ async function MergeOrderItemsWithProductData() {
const antoineOrder = result.find(
(order) => order.customer?.email === "antoine@example.com",
);
expect(antoineOrder).to.not.be.undefined;
expect(antoineOrder).to.not.equal(undefined);
expect(antoineOrder?.orderInfo.totalAmount).to.equal(1250);
}

Expand Down Expand Up @@ -186,14 +185,14 @@ async function MergeWithConditionalLogic() {
});

const highValueOrder = result.find((order) => order.totalAmount > 1200);
expect(highValueOrder).to.not.be.undefined;
expect(highValueOrder).to.not.equal(undefined);
if (highValueOrder) {
expect(highValueOrder.isHighValue).to.equal(true);
expect(highValueOrder.isPremium).to.equal(true);
}

const lowValueOrder = result.find((order) => order.totalAmount <= 1000);
expect(lowValueOrder).to.not.be.undefined;
expect(lowValueOrder).to.not.equal(undefined);
if (lowValueOrder) {
expect(lowValueOrder.isHighValue).to.equal(false);
expect(lowValueOrder.isPremium).to.equal(false);
Expand Down
Loading