Skip to content

Commit 2eebbda

Browse files
committed
rename test and use 'every' in lieu of 'some' when determining if the filter logic should execute
1 parent 2f4be13 commit 2eebbda

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

x-pack/plugins/security_solution/server/lib/detection_engine/signals/filter_events_with_list.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ describe('filterEventsAgainstList', () => {
193193
expect(['1.1.1.1', '3.3.3.3', '5.5.5.5', '7.7.7.7', '8.8.8.8', '9.9.9.9']).toEqual(ipVals);
194194
});
195195

196-
it('should respond with less items in the list given one exception item with two entries of type list if some values match', async () => {
196+
it('should respond with less items in the list given two exception items, each with one entry of type list if some values match', async () => {
197197
const exceptionItem = getExceptionListItemSchemaMock();
198198
exceptionItem.entries = [
199199
{

x-pack/plugins/security_solution/server/lib/detection_engine/signals/filter_events_with_list.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export const filterEventsAgainstList = async ({
103103
}
104104

105105
const valueListExceptionItems = exceptionsList.filter((listItem: ExceptionListItemSchema) => {
106-
return listItem.entries.some((entry) => entriesList.is(entry));
106+
return listItem.entries.every((entry) => entriesList.is(entry));
107107
});
108108

109109
// now that we have all the exception items which are value lists (whether single entry or have multiple entries)

0 commit comments

Comments
 (0)