diff options
Diffstat (limited to '')
| -rw-r--r-- | tests/eval.spec.ts | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/eval.spec.ts b/tests/eval.spec.ts new file mode 100644 index 0000000..97995bf --- /dev/null +++ b/tests/eval.spec.ts @@ -0,0 +1,20 @@ +import { left, right } from 'fp-ts/Either' +import { none, some } from 'fp-ts/Option' +import { Expr, ListExpr } from '../src/types' +import { jlog } from '../src/utils' +import { find } from '../src/eval' + +describe('Eval', () => { + it('should do shit', () => { + const liexp: ListExpr = [ + none, + [ Expr.AnyNumber(null), Expr.Truthy(null) ], + none, + ] + + const list = [0, 1, '2', 3, [4], 5] + + expect(find(liexp, list)).toEqual([1, 3, 5]) + }) +}) + |
