Skip to content

Commit

Permalink
style: run prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
fedeci committed Feb 21, 2024
1 parent 3b3a8ea commit 4f59858
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/field-selection.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,15 @@ describe('selectUnknownFields()', () => {
});

it('selects unknown fields nested under a checked wildcard', () => {
const req = { body: { obj: { nestedobj1: { foo: true, bar: 123, boom: { foo: true } }, nestedobj2: { foo: true, baz: true } }, arr: [{ foo: 'a' }, { foo: 'a', bar: true }] } };
const req = {
body: {
obj: {
nestedobj1: { foo: true, bar: 123, boom: { foo: true } },
nestedobj2: { foo: true, baz: true },
},
arr: [{ foo: 'a' }, { foo: 'a', bar: true }],
},
};
// arr and obj are checked
const instances = selectUnknownFields(req, ['obj', 'obj.*.foo', 'arr', 'arr.*.foo'], ['body']);
expect(instances).toHaveLength(4);
Expand All @@ -457,7 +465,6 @@ describe('selectUnknownFields()', () => {
});
});


it('selects unknown fields when there are muliple wildcards', () => {
const req = {
body: {
Expand Down

0 comments on commit 4f59858

Please sign in to comment.