Skip to content

Commit

Permalink
test: check if FC is a function
Browse files Browse the repository at this point in the history
  • Loading branch information
borodayev authored and nodkz committed Nov 8, 2017
1 parent 3387986 commit 2e93fd0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/__tests__/ObjectParser-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,13 @@ describe('ObjectParser', () => {
});
});

it('process object', () => {
it('function', () => {
const valueAsFn = () => 'abracadabra';
const res = OP.getFieldConfig(valueAsFn);
expect(res).toBe(valueAsFn);
});

it('object', () => {
const spy = jest.spyOn(OP, 'createTC');
const valueAsObj = { a: 123 };
OP.getFieldConfig(valueAsObj, {
Expand Down

0 comments on commit 2e93fd0

Please sign in to comment.