Skip to content

Commit c0feb25

Browse files
committed
test: Remove undefined from NetworkController "empty values" test cases
1 parent bfad862 commit c0feb25

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

packages/network-controller/src/create-network-client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ export function createNetworkClient({
178178

179179
const destroy = () => {
180180
// TODO: Either fix this lint violation or explain why it's necessary to ignore.
181-
// eslint-disable-next-line @typescript-eslint/no-floating-promises
181+
182182
blockTracker.destroy();
183183
};
184184

packages/network-controller/tests/network-client/block-hash-in-response.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ export function testsForRpcMethodsThatCheckForBlockHashInResponse(
203203
});
204204
});
205205

206-
for (const emptyValue of [null, undefined, '\u003cnil\u003e']) {
206+
for (const emptyValue of [null, '\u003cnil\u003e']) {
207207
it(`does not retry an empty response of "${emptyValue}"`, async () => {
208208
const request = { method };
209209
const mockResult = emptyValue;

packages/network-controller/tests/network-client/block-param.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ export function testsForRpcMethodSupportingBlockParam(
209209
});
210210
});
211211

212-
for (const emptyValue of [null, undefined, '\u003cnil\u003e']) {
212+
for (const emptyValue of [null, '\u003cnil\u003e']) {
213213
it(`does not retry an empty response of "${emptyValue}"`, async () => {
214214
const request = {
215215
method,
@@ -1227,7 +1227,7 @@ export function testsForRpcMethodSupportingBlockParam(
12271227
});
12281228
});
12291229

1230-
for (const emptyValue of [null, undefined, '\u003cnil\u003e']) {
1230+
for (const emptyValue of [null, '\u003cnil\u003e']) {
12311231
it(`does not retry an empty response of "${emptyValue}"`, async () => {
12321232
const request = {
12331233
method,
@@ -1360,7 +1360,7 @@ export function testsForRpcMethodSupportingBlockParam(
13601360
});
13611361
});
13621362

1363-
for (const emptyValue of [null, undefined, '\u003cnil\u003e']) {
1363+
for (const emptyValue of [null, '\u003cnil\u003e']) {
13641364
if (providerType === 'infura') {
13651365
it(`retries up to 10 times if a "${emptyValue}" response is returned, returning successful non-empty response if there is one on the 10th try`, async () => {
13661366
const request = {
@@ -1555,7 +1555,7 @@ export function testsForRpcMethodSupportingBlockParam(
15551555
});
15561556
});
15571557

1558-
for (const emptyValue of [null, undefined, '\u003cnil\u003e']) {
1558+
for (const emptyValue of [null, '\u003cnil\u003e']) {
15591559
it(`does not retry an empty response of "${emptyValue}"`, async () => {
15601560
const request = {
15611561
method,

packages/network-controller/tests/network-client/no-block-param.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ export function testsForRpcMethodAssumingNoBlockParam(
149149
});
150150
});
151151

152-
for (const emptyValue of [null, undefined, '\u003cnil\u003e']) {
152+
for (const emptyValue of [null, '\u003cnil\u003e']) {
153153
it(`does not retry an empty response of "${emptyValue}"`, async () => {
154154
const request = { method };
155155
const mockResult = emptyValue;

0 commit comments

Comments
 (0)