Skip to content

Commit 9efd040

Browse files
committed
add comments explaining funky eslint logic
1 parent 784597c commit 9efd040

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

packages/data-connect/test/unit/fetch.test.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,11 @@ describe('fetch', () => {
9292
};
9393
const fakeFetchImpl = mockFetch(json, false);
9494

95-
const callerSdkTypesUsed: string[] = [];
96-
9795
for (const callerSdkType in CallerSdkTypeEnum) {
96+
// this check is done to follow the best practices outlined by the "guard-for-in" eslint rule
9897
if (
9998
Object.prototype.hasOwnProperty.call(CallerSdkTypeEnum, callerSdkType)
10099
) {
101-
callerSdkTypesUsed.push(callerSdkType);
102100
await dcFetch(
103101
'http://localhost',
104102
{
@@ -143,6 +141,7 @@ describe('fetch', () => {
143141
const fakeFetchImpl = mockFetch(json, false);
144142

145143
for (const callerSdkType in CallerSdkTypeEnum) {
144+
// this check is done to follow the best practices outlined by the "guard-for-in" eslint rule
146145
if (
147146
Object.prototype.hasOwnProperty.call(CallerSdkTypeEnum, callerSdkType)
148147
) {

0 commit comments

Comments
 (0)