File size: 490 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
import { flatten } from '../../utils/flatten';
describe('flatten', () => {
it('should flatten form values into flat form data', () => {
expect(
flatten({
hey: 'test',
array: [
{
test: '1',
test2: '2',
test3: null,
},
],
test: {
nested: {
test: 'bill',
test3: null,
},
},
test1: null,
}),
).toMatchSnapshot();
});
});
|