diff options
| author | Akshay Nair <phenax5@gmail.com> | 2022-01-08 22:16:37 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2022-01-08 22:18:00 +0530 |
| commit | 2b8ceabd93205f2f852aa08d5fcdc4a8151ae131 (patch) | |
| tree | 131d84fd80a34b0c416bc24e384b408a2372ef1d /tests/eval.spec.ts | |
| parent | f9544958194efb54e2c4f211a632964c488456e8 (diff) | |
| download | elxr-2b8ceabd93205f2f852aa08d5fcdc4a8151ae131.tar.gz elxr-2b8ceabd93205f2f852aa08d5fcdc4a8151ae131.zip | |
feat(eval): one or more (incomplete)
Diffstat (limited to '')
| -rw-r--r-- | tests/eval.spec.ts | 13 |
1 files changed, 13 insertions, 0 deletions
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]) + }) }) |
