Skip to content

Commit fd43191

Browse files
committed
chore: format file
1 parent 1be9914 commit fd43191

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

src/tests/filter/filter.test.ts

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -129,55 +129,55 @@ describe(`filter`, () => {
129129
{ id: 2, tags: ['python', 'typescript'] },
130130
{ id: 3, tags: ['java'] },
131131
{ id: 4, tags: [] },
132-
{ id: 5 }
132+
{ id: 5 },
133133
];
134134

135135
it('should filter by array value', () => {
136136
const result = filter(new QueryParser('tags:typescript'), data);
137137
expect(result).toEqual([
138138
{ id: 1, tags: ['javascript', 'typescript'] },
139-
{ id: 2, tags: ['python', 'typescript'] }
139+
{ id: 2, tags: ['python', 'typescript'] },
140140
]);
141141
});
142142

143143
it('should handle nested array fields', () => {
144144
const nestedData = [
145-
{
145+
{
146146
id: 1,
147147
nested: {
148-
tags: ['javascript', 'typescript']
149-
}
148+
tags: ['javascript', 'typescript'],
149+
},
150150
},
151-
{
151+
{
152152
id: 2,
153153
nested: {
154-
tags: ['python']
155-
}
154+
tags: ['python'],
155+
},
156156
},
157-
{
157+
{
158158
id: 3,
159159
nested: {
160-
other: ['something']
161-
}
162-
}
160+
other: ['something'],
161+
},
162+
},
163163
];
164164

165165
const queries = [
166-
'nested.tags:typescript', // explicit field path
167-
'*.tags:typescript', // wildcard prefix
168-
'nested.tags*:typescript', // wildcard suffix
169-
'*.tags*:typescript' // wildcard on both sides
166+
'nested.tags:typescript', // explicit field path
167+
'*.tags:typescript', // wildcard prefix
168+
'nested.tags*:typescript', // wildcard suffix
169+
'*.tags*:typescript', // wildcard on both sides
170170
];
171171

172172
for (const query of queries) {
173173
const result = filter(new QueryParser(query), nestedData);
174174
expect(result).toEqual([
175-
{
176-
id: 1,
177-
nested: {
178-
tags: ['javascript', 'typescript']
179-
}
180-
}
175+
{
176+
id: 1,
177+
nested: {
178+
tags: ['javascript', 'typescript'],
179+
},
180+
},
181181
]);
182182
}
183183
});

0 commit comments

Comments
 (0)