summaryrefslogtreecommitdiff
path: root/tests/eval.spec.ts
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2022-01-08 22:16:37 +0530
committerAkshay Nair <phenax5@gmail.com>2022-01-08 22:18:00 +0530
commit2b8ceabd93205f2f852aa08d5fcdc4a8151ae131 (patch)
tree131d84fd80a34b0c416bc24e384b408a2372ef1d /tests/eval.spec.ts
parentf9544958194efb54e2c4f211a632964c488456e8 (diff)
downloadelxr-2b8ceabd93205f2f852aa08d5fcdc4a8151ae131.tar.gz
elxr-2b8ceabd93205f2f852aa08d5fcdc4a8151ae131.zip
feat(eval): one or more (incomplete)
Diffstat (limited to 'tests/eval.spec.ts')
-rw-r--r--tests/eval.spec.ts13
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])
+ })
})