mirror of
https://github.com/ading2210/libcurl.js.git
synced 2025-05-12 14:00:01 -04:00
add unit tests
This commit is contained in:
parent
b071019761
commit
2d98b82ee3
9 changed files with 147 additions and 2 deletions
8
client/tests/scripts/fetch_parallel.js
Normal file
8
client/tests/scripts/fetch_parallel.js
Normal file
|
@ -0,0 +1,8 @@
|
|||
async function test() {
|
||||
await libcurl.fetch("https://www.example.com/");
|
||||
let promises = [];
|
||||
for (let i=0; i<10; i++) {
|
||||
promises.push(libcurl.fetch("https://www.example.com/"))
|
||||
}
|
||||
await Promise.all(promises);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue