MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / next

Function next

tests/modules/network/http/httpsget-missing-cert.js:14–27  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

12const host = "ya.ru";
13
14function next() {
15 let request = new Request({host, path: "/",
16 port: 443, Socket: SecureSocket, secure: {verify: true}});
17 request.callback = function(message, value, etc) {
18 this.close();
19 if (message < 0)
20 $DONE();
21 else {
22 if (Resource.exists("ca107.der"))
23 $DONE(`didn't expect root certificate for ${host} to be found`);
24 $DONE("unexpected success");
25 }
26 }
27}
28
29let request = new Request({host, path: "/",
30 port: 443, Socket: SecureSocket, secure: {verify: false}});

Callers 1

Calls 2

closeMethod · 0.65
existsMethod · 0.65

Tested by

no test coverage detected