|
|
|
@ -96,17 +96,23 @@ async function retrieveRecordsAndValidate(
|
|
|
|
|
); |
|
|
|
|
break; |
|
|
|
|
case 'lt': |
|
|
|
|
expectedRecords = unfilteredRecords.filter( |
|
|
|
|
(record) => |
|
|
|
|
(toFloat ? parseFloat(record[title]) : record[title]) < |
|
|
|
|
expectedRecords = unfilteredRecords.filter((record) => |
|
|
|
|
title === 'Rating' |
|
|
|
|
? (toFloat ? parseFloat(record[title]) : record[title]) < |
|
|
|
|
(toFloat ? parseFloat(filter.value) : filter.value) || |
|
|
|
|
record[title] === null |
|
|
|
|
: (toFloat ? parseFloat(record[title]) : record[title]) < |
|
|
|
|
(toFloat ? parseFloat(filter.value) : filter.value) && |
|
|
|
|
record[title] !== null |
|
|
|
|
); |
|
|
|
|
break; |
|
|
|
|
case 'lte': |
|
|
|
|
expectedRecords = unfilteredRecords.filter( |
|
|
|
|
(record) => |
|
|
|
|
(toFloat ? parseFloat(record[title]) : record[title]) <= |
|
|
|
|
expectedRecords = unfilteredRecords.filter((record) => |
|
|
|
|
title === 'Rating' |
|
|
|
|
? (toFloat ? parseFloat(record[title]) : record[title]) <= |
|
|
|
|
(toFloat ? parseFloat(filter.value) : filter.value) || |
|
|
|
|
record[title] === null |
|
|
|
|
: (toFloat ? parseFloat(record[title]) : record[title]) <= |
|
|
|
|
(toFloat ? parseFloat(filter.value) : filter.value) && |
|
|
|
|
record[title] !== null |
|
|
|
|
); |
|
|
|
|