Skip to content

Commit 200d810

Browse files
committed
ref(browser-utils): Use undefined assertion
Signed-off-by: Kaung Zin Hein <[email protected]>
1 parent 67e2971 commit 200d810

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

packages/browser-utils/test/networkUtils.test.ts

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -83,18 +83,14 @@ describe('getFetchRequestArgBody', () => {
8383

8484
describe('does not work without body passed as the second option', () => {
8585
it.each([
86-
['string URL only', ['http://example.com'], undefined],
87-
['URL object only', [new URL('http://example.com')], undefined],
88-
['Request URL only', [{ url: 'http://example.com' }], undefined],
89-
[
90-
'body in first arg',
91-
[{ url: 'http://example.com', method: 'POST', body: JSON.stringify({ data: [1, 2, 3] }) }],
92-
undefined,
93-
],
94-
])('%s', (_name, args, expected) => {
86+
['string URL only', ['http://example.com']],
87+
['URL object only', [new URL('http://example.com')]],
88+
['Request URL only', [{ url: 'http://example.com' }]],
89+
['body in first arg', [{ url: 'http://example.com', method: 'POST', body: JSON.stringify({ data: [1, 2, 3] }) }]],
90+
])('%s', (_name, args) => {
9591
const actual = getFetchRequestArgBody(args);
9692

97-
expect(actual).toEqual(expected);
93+
expect(actual).toBeUndefined();
9894
});
9995
});
10096
});

0 commit comments

Comments
 (0)