Skip to content

Commit

Permalink
test: enable test in ci (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
kristw authored and zhaoyongjie committed Nov 25, 2021
1 parent edef8b7 commit a3cf1a1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ before_script:
- yarn build

script:
- yarn lint
- yarn test

after_script:
- codecov
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import extractGetter from '../../../src/encodeable/parsers/extractGetter';

describe('extractGetter', () => {
it('extract getter from ValueDef { value: "abc" }', () => {
const getter = extractGetter({ value: 'abc' });
expect(getter(undefined)).toEqual('abc');
});

it('extract getter from FieldDef { field: "fieldName" }', () => {
const getter = extractGetter({ field: 'age' });
expect(getter({ age: 10 })).toEqual(10);
});
});

0 comments on commit a3cf1a1

Please sign in to comment.