diff options
| author | Akshay Nair <phenax5@gmail.com> | 2022-01-06 21:08:12 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2022-01-06 21:08:12 +0530 |
| commit | f129d1d6e8f03e586952d8c792c8e085ae7bca85 (patch) | |
| tree | d9957ad3c42f886748cb6007451cba8b5f566d49 /tests/basic.spec.ts | |
| parent | 6ee30757cf9946074e2b5bb29a59b299fc48d0d8 (diff) | |
| download | elxr-f129d1d6e8f03e586952d8c792c8e085ae7bca85.tar.gz elxr-f129d1d6e8f03e586952d8c792c8e085ae7bca85.zip | |
feat: basic parser
Diffstat (limited to 'tests/basic.spec.ts')
| -rw-r--r-- | tests/basic.spec.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/basic.spec.ts b/tests/basic.spec.ts index ed1a8c7..26a2edb 100644 --- a/tests/basic.spec.ts +++ b/tests/basic.spec.ts @@ -1,8 +1,10 @@ -import { x } from "../src"; +import {right} from 'fp-ts/Either' +import { many0, digit, integer, whitespace } from '../src' describe('Foobar', () => { it ('should do shit', () => { - expect(x).toBe(200) + expect(integer('12901')).toEqual(right([12901, ''])) + expect(integer('12901asas')).toEqual(right([12901, 'asas'])) }) }) |
