puppeteer/third_party/phantomjs/test/module/webserver/basics.js

26 lines
759 B
JavaScript
Raw Normal View History

2017-05-11 07:06:41 +00:00
test(function () {
assert_no_property(window, "WebServer",
"WebServer constructor should not be global");
var WebServer = require("webserver").create;
assert_type_of(WebServer, "function");
}, "WebServer constructor");
test(function () {
var server = require("webserver").create();
assert_not_equals(server, null);
assert_type_of(server, "object");
assert_equals(server.objectName, "WebServer");
assert_own_property(server, "port");
assert_type_of(server.port, "string");
assert_equals(server.port, "");
assert_type_of(server.listenOnPort, "function");
assert_type_of(server.newRequest, "function");
assert_type_of(server.close, "function");
}, "WebServer object properties");