UNPKG

@synotech/utils

Version:

a collection of utilities for internal use

27 lines (23 loc) 386 B
import { searchObject } from '..'; describe('search object', () => { beforeEach(() => { jest.clearAllMocks(); }); // @ts-ignore) const obj = [ { name: 'VAT', category: 'sales', value: 15, }, { name: 'None', category: 'sales', value: 0, }, ]; it('searches', async () => { const res = searchObject('at', obj); expect(res.length).toBe(1); }); });