Skip to content

Commit 56c7c11

Browse files
author
K-Dud
committed
test case filtering nested objects
1 parent db7c14f commit 56c7c11

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

frontend-vue/src/core/filter.spec.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,21 @@ describe("filter", () => {
3737

3838
expect(actualFound).toBeFalsy();
3939
});
40+
41+
it("should search in nested object array", () => {
42+
const nestedObject = {
43+
a: [
44+
{
45+
b: [
46+
{
47+
c: "hit",
48+
},
49+
],
50+
},
51+
],
52+
};
53+
54+
const result = filter(nestedObject, "hit");
55+
expect(result).toBeTruthy();
56+
});
4057
});

0 commit comments

Comments
 (0)