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-4
Original file line number
Diff line number
Diff line change
@@ -2176,7 +2176,7 @@ test('MockAgent - enableNetConnect should throw if dispatch not matched for meth
2176
2176
2177
2177
awaitt.rejects(request(`${baseUrl}/foo`,{
2178
2178
method: 'WRONG'
2179
-
}),newMockNotMatchedError(`Mock dispatch not matched for method 'WRONG': subsequent request to origin ${baseUrl} was not allowed (net.connect is not enabled for this origin)`))
2179
+
}),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)`))
2180
2180
})
2181
2181
2182
2182
test('MockAgent - enableNetConnect should throw if dispatch not matched for body and the origin was not allowed by net connect',async(t)=>{
@@ -2209,7 +2209,7 @@ test('MockAgent - enableNetConnect should throw if dispatch not matched for body
2209
2209
awaitt.rejects(request(`${baseUrl}/foo`,{
2210
2210
method: 'GET',
2211
2211
body: 'wrong'
2212
-
}),newMockNotMatchedError(`Mock dispatch not matched for body 'wrong': subsequent request to origin ${baseUrl} was not allowed (net.connect is not enabled for this origin)`))
2212
+
}),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)`))
2213
2213
})
2214
2214
2215
2215
test('MockAgent - enableNetConnect should throw if dispatch not matched for headers and the origin was not allowed by net connect',async(t)=>{
@@ -2246,7 +2246,7 @@ test('MockAgent - enableNetConnect should throw if dispatch not matched for head
2246
2246
headers: {
2247
2247
'User-Agent': 'wrong'
2248
2248
}
2249
-
}),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)`))
2249
+
}),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)`))
2250
2250
})
2251
2251
2252
2252
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)`))
2320
+
}),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