File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { describe , it , expect } from "vitest" ;
2- import fetchMock from "fetch-mock" ;
32
43import { request } from "../src/index.ts" ;
54
@@ -97,10 +96,6 @@ describe("request()", () => {
9796 it ( "Request TypeError error with a string cause" , async ( ) => {
9897 expect . assertions ( 2 ) ;
9998
100- const mock = fetchMock . sandbox ( ) . get ( "https://127.0.0.1:8/" , {
101- throws : Object . assign ( new TypeError ( "fetch failed" ) , { cause : "bad" } ) ,
102- } ) ;
103-
10499 try {
105100 // port: 8 // officially unassigned port. See https://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers
106101 await request ( "GET https://127.0.0.1:8/" , {
You can’t perform that action at this time.
0 commit comments