From 9c32eaafda40603f4d5a50320b7006c64e6f4c4d Mon Sep 17 00:00:00 2001 From: Quazia Date: Tue, 6 Feb 2024 16:00:24 -0500 Subject: [PATCH] Test(filters): cleanup filter object type for nth tests --- src/filter/filters.test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/filter/filters.test.ts b/src/filter/filters.test.ts index 9c9166a..da4f4cd 100644 --- a/src/filter/filters.test.ts +++ b/src/filter/filters.test.ts @@ -8,7 +8,7 @@ import { handleRegex, handleSome, } from './filters.js' -import type { Filter, FilterObject, FilterOperator } from './types.js' +import type { Filter, FilterObject } from './types.js' import { assertType, describe, expect, test } from 'vitest' describe('parser', () => { @@ -51,7 +51,7 @@ describe('parser', () => { describe('nth', () => { test('should return true if the nth item in the array meets the condition', () => { - const filter = { index: 1, value: { $gte: '50' } as FilterOperator } + const filter = { index: 1, value: { $gte: '50' } } const context = ['10', '100', '10', '60'] const result = handleNth(context, filter) assertType(result) @@ -59,7 +59,7 @@ describe('parser', () => { }) test('should return false if the nth item in the array does not meet the condition', () => { - const filter = { index: 2, value: { $gte: '50' } as FilterOperator } + const filter = { index: 2, value: { $gte: '50' } } const context = ['10', '100', '10', '60'] const result = handleNth(context, filter) assertType(result) @@ -67,7 +67,7 @@ describe('parser', () => { }) test('should return false if n overflows the array', () => { - const filter = { index: 4, value: { $gte: '50' } as FilterOperator } + const filter = { index: 4, value: { $gte: '50' } } const context = ['10', '100', '10', '60'] const result = handleNth(context, filter) assertType(result)