(command, parameters, w3c, expectedMethod, expectedUrl, opt_expectedParams)
| 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 |
no test coverage detected