Skip to content

Commit c193167

Browse files
test: Fix code coverage to a single line
1 parent 4d3deb0 commit c193167

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/Utils.test.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,4 +154,12 @@ describe("utils", () => {
154154

155155
expect(fetchSuccess).toBeInstanceOf(Object)
156156
})
157+
158+
it("fetchLite: invalid URL", async () => {
159+
expect.assertions(1)
160+
161+
const fetchSuccess = await fetchLite("invalid")
162+
163+
expect(fetchSuccess).toBeUndefined()
164+
})
157165
})

src/Utils.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ export const fetchLite = <T>(
161161
thisReq.write(bodyStringify)
162162
}
163163

164-
// istanbul ignore next
165164
thisReq.on("error", () => resolve(undefined))
166165
thisReq.end()
167166
})

0 commit comments

Comments
 (0)