mirror of
https://github.com/github/codeql.git
synced 2026-04-24 00:05:14 +02:00
Added additional test cases for got package.
This commit is contained in:
@@ -97,6 +97,9 @@ test_ClientRequest
|
||||
| tst.js:319:5:319:26 | superag ... ', url) |
|
||||
| tst.js:320:5:320:23 | superagent.del(url) |
|
||||
| tst.js:321:5:321:32 | superag ... st(url) |
|
||||
| tst.js:328:5:328:38 | got(und ... ptions) |
|
||||
| tst.js:329:5:329:45 | got(und ... {url})) |
|
||||
| tst.js:337:5:337:20 | jsonClient.get() |
|
||||
test_getADataNode
|
||||
| axiosTest.js:12:5:17:6 | axios({ ... \\n }) | axiosTest.js:15:18:15:55 | { 'Cont ... json' } |
|
||||
| axiosTest.js:12:5:17:6 | axios({ ... \\n }) | axiosTest.js:16:15:16:35 | {x: 'te ... 'test'} |
|
||||
@@ -254,6 +257,8 @@ test_getUrl
|
||||
| tst.js:319:5:319:26 | superag ... ', url) | tst.js:319:23:319:25 | url |
|
||||
| tst.js:320:5:320:23 | superagent.del(url) | tst.js:320:20:320:22 | url |
|
||||
| tst.js:321:5:321:32 | superag ... st(url) | tst.js:321:29:321:31 | url |
|
||||
| tst.js:328:5:328:38 | got(und ... ptions) | tst.js:328:9:328:17 | undefined |
|
||||
| tst.js:329:5:329:45 | got(und ... {url})) | tst.js:329:9:329:17 | undefined |
|
||||
test_getAResponseDataNode
|
||||
| axiosTest.js:4:5:7:6 | axios({ ... \\n }) | axiosTest.js:4:5:7:6 | axios({ ... \\n }) | json | true |
|
||||
| axiosTest.js:12:5:17:6 | axios({ ... \\n }) | axiosTest.js:12:5:17:6 | axios({ ... \\n }) | json | true |
|
||||
@@ -334,3 +339,6 @@ test_getAResponseDataNode
|
||||
| tst.js:319:5:319:26 | superag ... ', url) | tst.js:319:5:319:26 | superag ... ', url) | stream | true |
|
||||
| tst.js:320:5:320:23 | superagent.del(url) | tst.js:320:5:320:23 | superagent.del(url) | stream | true |
|
||||
| tst.js:321:5:321:32 | superag ... st(url) | tst.js:321:5:321:32 | superag ... st(url) | stream | true |
|
||||
| tst.js:328:5:328:38 | got(und ... ptions) | tst.js:328:5:328:38 | got(und ... ptions) | text | true |
|
||||
| tst.js:329:5:329:45 | got(und ... {url})) | tst.js:329:5:329:45 | got(und ... {url})) | text | true |
|
||||
| tst.js:337:5:337:20 | jsonClient.get() | tst.js:337:5:337:20 | jsonClient.get() | text | true |
|
||||
|
||||
@@ -320,3 +320,22 @@ function useSuperagent(url){
|
||||
superagent.del(url);
|
||||
superagent.agent().post(url).send(data);
|
||||
}
|
||||
|
||||
import { Options } from 'got';
|
||||
|
||||
function gotTests(url){
|
||||
const options = new Options({url});
|
||||
got(undefined, undefined, options); // undefined is flagged, but should be url from options
|
||||
got(undefined, undefined, Options({url})); // undefined is flagged, but should be url from options
|
||||
|
||||
const options2 = new Options({url});
|
||||
got.extend(options2).extend(options).get(); // not flagged
|
||||
|
||||
got.paginate(url, {}); // not flagged
|
||||
|
||||
const jsonClient = got.extend({url: url});
|
||||
jsonClient.get(); // call flagged not the actual url flow
|
||||
|
||||
const jsonClient2 = got.extend({url: url}).extend({url: url});
|
||||
jsonClient2.get(); // not flagged
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user