MCPcopy
hub / github.com/SeleniumHQ/selenium / test

Function test

javascript/selenium-webdriver/test/lib/http_test.js:160–173  ·  view source on GitHub ↗
(command, parameters, w3c, expectedMethod, expectedUrl, opt_expectedParams)

Source from the content-addressed store, hash-verified

158 })
159
160 function test(command, parameters, w3c, expectedMethod, expectedUrl, opt_expectedParams) {
161 it(`command=${command}`, function () {
162 const resp = JSON.stringify({ sessionId: 'abc123' })
163 send.returns(Promise.resolve(new http.Response(200, {}, resp)))
164
165 let cmd = new Command(command).setParameters(parameters)
166 executor.w3c = w3c
167 return executor.execute(cmd).then(function () {
168 assertSent(expectedMethod, expectedUrl, opt_expectedParams || {}, [
169 ['Accept', 'application/json; charset=utf-8'],
170 ])
171 })
172 })
173 }
174 })
175 })
176

Callers 1

http_test.jsFile · 0.70

Calls 5

assertSentFunction · 0.85
setParametersMethod · 0.80
failMethod · 0.80
setParameterMethod · 0.80
executeMethod · 0.65

Tested by

no test coverage detected