Starting server and stopping works.

Receiving receiving needs improvements
This commit is contained in:
Michael Bykovski
2017-07-10 09:58:47 +02:00
parent 1459752b0d
commit 5c160eee16
4 changed files with 88 additions and 18 deletions
+22
View File
@@ -16,12 +16,34 @@ exports.defineAutoTests = function() {
});
})
});
describe('Do a request', function() {
it('should do a request', function() {
webserver.onRequest(
function(request) {
// Check for a request is made
}
);
websever.start();
webserver.stop();
});
});
};
exports.defineManualTests = function(contentEl, createActionButton) {
createActionButton('Start bljad Webserver', function() {
console.log("Starting webserver...");
console.log(webserver);
webserver.onRequest(
function(request) {
console.log(request);
webserver.sendResponse(request.requestId, {});
}
);
webserver.start(
function() {
console.log('Success!');