From 2b8ceabd93205f2f852aa08d5fcdc4a8151ae131 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Sat, 8 Jan 2022 22:16:37 +0530 Subject: feat(eval): one or more (incomplete) --- tests/eval.spec.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'tests') diff --git a/tests/eval.spec.ts b/tests/eval.spec.ts index dada762..8c79375 100644 --- a/tests/eval.spec.ts +++ b/tests/eval.spec.ts @@ -60,4 +60,17 @@ describe('Eval', () => { expect(find(liexp, list)).toEqual([{ name: 'gello', age: 20 }]) }) + + xit('with groups', () => { + const list = [0, 1, 1, 1, '2', 3, 4, [4], 5, ''] + + const liexp: ListExpr = [ + none, + [ + Expr.OneOrMore({ expr: Expr.AnyNumber(null) }), + ], + none, + ] + expect(find(liexp, list)).toEqual([1, 3, 5]) + }) }) -- cgit v1.3.1