You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test/mock-agent.js
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -2162,7 +2162,7 @@ test('MockAgent - enableNetConnect should throw if dispatch not matched for meth
2162
2162
2163
2163
awaitt.rejects(request(`${baseUrl}/foo`,{
2164
2164
method: 'WRONG'
2165
-
}),newMockNotMatchedError(`Mock dispatch not matched for method 'WRONG': subsequent request to origin ${baseUrl} was not allowed (net.connect is not enabled for this origin)`))
2165
+
}),newMockNotMatchedError(`Mock dispatch not matched for method 'WRONG' on path '/foo': subsequent request to origin ${baseUrl} was not allowed (net.connect is not enabled for this origin)`))
2166
2166
})
2167
2167
2168
2168
test('MockAgent - enableNetConnect should throw if dispatch not matched for body and the origin was not allowed by net connect',async(t)=>{
@@ -2195,7 +2195,7 @@ test('MockAgent - enableNetConnect should throw if dispatch not matched for body
2195
2195
awaitt.rejects(request(`${baseUrl}/foo`,{
2196
2196
method: 'GET',
2197
2197
body: 'wrong'
2198
-
}),newMockNotMatchedError(`Mock dispatch not matched for body 'wrong': subsequent request to origin ${baseUrl} was not allowed (net.connect is not enabled for this origin)`))
2198
+
}),newMockNotMatchedError(`Mock dispatch not matched for body 'wrong' on path '/foo': subsequent request to origin ${baseUrl} was not allowed (net.connect is not enabled for this origin)`))
2199
2199
})
2200
2200
2201
2201
test('MockAgent - enableNetConnect should throw if dispatch not matched for headers and the origin was not allowed by net connect',async(t)=>{
@@ -2232,7 +2232,7 @@ test('MockAgent - enableNetConnect should throw if dispatch not matched for head
2232
2232
headers: {
2233
2233
'User-Agent': 'wrong'
2234
2234
}
2235
-
}),newMockNotMatchedError(`Mock dispatch not matched for headers '{"User-Agent":"wrong"}': subsequent request to origin ${baseUrl} was not allowed (net.connect is not enabled for this origin)`))
2235
+
}),newMockNotMatchedError(`Mock dispatch not matched for headers '{"User-Agent":"wrong"}' on path '/foo': subsequent request to origin ${baseUrl} was not allowed (net.connect is not enabled for this origin)`))
2236
2236
})
2237
2237
2238
2238
test('MockAgent - disableNetConnect should throw if dispatch not found by net connect',async(t)=>{
}),newMockNotMatchedError(`Mock dispatch not matched for headers '{"Authorization":"Bearer foo"}': subsequent request to origin ${baseUrl} was not allowed (net.connect disabled)`))
2306
+
}),newMockNotMatchedError(`Mock dispatch not matched for headers '{"Authorization":"Bearer foo"}' on path '/foo': subsequent request to origin ${baseUrl} was not allowed (net.connect disabled)`))
0 commit comments