mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 11:50:00 +00:00
test env requst http://localhost:8080
This test expect get 200 HTTP code on get request to http://localhost:8080
This commit is contained in:
parent
6ea1732630
commit
afe2b934de
@ -1,5 +1,8 @@
|
||||
const globalSetup = require("./global-setup");
|
||||
const app = globalSetup.app;
|
||||
const request = require("request");
|
||||
const chai = require("chai");
|
||||
const expect = chai.expect;
|
||||
|
||||
describe("Electron app environment", function () {
|
||||
this.timeout(20000);
|
||||
@ -17,7 +20,6 @@ describe("Electron app environment", function () {
|
||||
app.stop().then(function() { done(); });
|
||||
});
|
||||
|
||||
|
||||
it("is set to open new app window", function () {
|
||||
return app.client.waitUntilWindowLoaded()
|
||||
.getWindowCount().should.eventually.equal(1);
|
||||
@ -28,4 +30,11 @@ describe("Electron app environment", function () {
|
||||
.getTitle().should.eventually.equal("Magic Mirror");
|
||||
});
|
||||
|
||||
it("get request from http://localhost:8080 should return 200", function (done) {
|
||||
request.get("http://localhost:8080", function (err, res, body) {
|
||||
expect(res.statusCode).to.equal(200);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user