From d6106e5e1c00fb964b16bdacd7ca0cb423cbb961 Mon Sep 17 00:00:00 2001 From: Cristiano Tofani Date: Thu, 14 Mar 2024 11:33:41 +0100 Subject: [PATCH] update commons lib and add test --- package.json | 2 +- src/filtering/__test__/filter.test.ts | 4 ++++ yarn.lock | 8 ++++---- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 8076009..57415e8 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ }, "dependencies": { "@azure/cosmos": "^4.0.0", - "@pagopa/data-indexer-commons": "^0.3.0", + "@pagopa/data-indexer-commons": "^0.3.1", "@azure/data-tables": "^13.2.2", "@azure/storage-blob": "^12.17.0", "@elastic/elasticsearch": "^8.12.0", diff --git a/src/filtering/__test__/filter.test.ts b/src/filtering/__test__/filter.test.ts index 0120adc..915378c 100644 --- a/src/filtering/__test__/filter.test.ts +++ b/src/filtering/__test__/filter.test.ts @@ -52,6 +52,10 @@ describe("filter", () => { const res = filterDynamic("bar", "eq", "undef")(inputData); expect(E.isLeft(res)).toBeTruthy(); }); + it("should return left for dynamicCompare on wrong Filter Definition (isNull)", () => { + const res = filterDynamic("bar", "isNull", "undef")(inputData); + expect(E.isLeft(res)).toBeTruthy(); + }); it("should return E.right(false) for dynamicCompare on identity compare for 'gt' compare", () => { const res = filterDynamic("bar", "gt", "bar")(inputData); expect(res).toEqual(E.right(false)); diff --git a/yarn.lock b/yarn.lock index 06405c9..1705c33 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1393,10 +1393,10 @@ danger-plugin-yarn "^1.2.1" pivotaljs "^1.0.3" -"@pagopa/data-indexer-commons@^0.3.0": - version "0.3.0" - resolved "https://registry.yarnpkg.com/@pagopa/data-indexer-commons/-/data-indexer-commons-0.3.0.tgz#c75850bd8dda703b8fbdf3d658c5042094e8bf3e" - integrity sha512-hKJLm8LBN3B1AtQyIPlcTDfVgpTu/oAKM22ryloM9VxYLcgh4h8mO0ZLxNDGoP9nhyXNkKlk6rh9dzjKMqBzOA== +"@pagopa/data-indexer-commons@^0.3.1": + version "0.3.1" + resolved "https://registry.yarnpkg.com/@pagopa/data-indexer-commons/-/data-indexer-commons-0.3.1.tgz#6236ad64ea762d0475faa631ea83419e41731d08" + integrity sha512-a4tf+xKvXdwKRR2SCSKHkZmy7gbXWUsZ2vExaP15AEokZN8ht5W4o88+W5As8wfJD6MEYZAg036x/0s1BbCc7A== dependencies: "@pagopa/ts-commons" "^12.4.1" fp-ts "^2.16.1"