diff options
| author | Akshay Nair <phenax5@gmail.com> | 2022-01-13 14:49:05 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2022-01-13 14:49:05 +0530 |
| commit | 6b9a3d2ee4ec49f38f02106e3aa264946b7cdc93 (patch) | |
| tree | b884da940ff47683064e1723655ed46b8ab7f85d /tests/eval.spec.ts | |
| parent | 6362218062a7b41e4aefe902ba5aed11aaa540c5 (diff) | |
| download | elxr-6b9a3d2ee4ec49f38f02106e3aa264946b7cdc93.tar.gz elxr-6b9a3d2ee4ec49f38f02106e3aa264946b7cdc93.zip | |
refactor: type + constructors refactor
Diffstat (limited to '')
| -rw-r--r-- | tests/eval.spec.ts | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/eval.spec.ts b/tests/eval.spec.ts index ca06033..2d7e1c0 100644 --- a/tests/eval.spec.ts +++ b/tests/eval.spec.ts @@ -13,7 +13,7 @@ describe('Eval', () => { [ Expr.OneOrMore({ expr: Expr.Group({ - exprs: [Expr.AnyNumber(null), Expr.Truthy(null)], + exprs: [Expr.AnyNumber(), Expr.Truthy()], }), }), ], @@ -28,14 +28,14 @@ describe('Eval', () => { const liexp: ListExpr = [ none, - [Expr.AnyNumber(null), Expr.Truthy(null)], + [Expr.AnyNumber(), Expr.Truthy()], none, ] expect(find(liexp, list)).toEqual([1, 3, 5]) const liexp2: ListExpr = [ none, - [Expr.Falsey(null), Expr.Truthy(null)], + [Expr.Falsey(), Expr.Truthy()], none, ] expect(find(liexp2, list)).toEqual([]) @@ -47,8 +47,8 @@ describe('Eval', () => { const liexp: ListExpr = [ none, [ - Expr.AnyItem(null), - Expr.Group({ exprs: [Expr.AnyNumber(null), Expr.Truthy(null)] }), + Expr.AnyItem(), + Expr.Group({ exprs: [Expr.AnyNumber(), Expr.Truthy()] }), ], none, ] @@ -69,9 +69,9 @@ describe('Eval', () => { [ Expr.PropertyMatch({ name: 'name', - exprs: [Expr.AnyString(null), Expr.Truthy(null)], + exprs: [Expr.AnyString(), Expr.Truthy()], }), - Expr.PropertyMatch({ name: 'age', exprs: [Expr.AnyNumber(null)] }), + Expr.PropertyMatch({ name: 'age', exprs: [Expr.AnyNumber()] }), ], none, ] @@ -84,7 +84,7 @@ describe('Eval', () => { const liexp: ListExpr = [ none, - [Expr.OneOrMore({ expr: Expr.AnyNumber(null) })], + [Expr.OneOrMore({ expr: Expr.AnyNumber() })], none, ] expect(find(liexp, list)).toEqual([1, 3, 5]) |
