MagicMirror/tests/e2e/port_config.js
Rodrigo Ramírez Norambuena 4fdd12bc48 Test change port configuration
This test change to 8090 port on configuration and check if system
response there.
2017-03-09 21:17:39 -03:00

33 lines
774 B
JavaScript

const globalSetup = require("./global-setup");
const app = globalSetup.app;
const request = require("request");
const chai = require("chai");
const expect = chai.expect;
describe("port directive configuration", function () {
this.timeout(20000);
beforeEach(function (done) {
app.start().then(function() { done(); } );
});
afterEach(function (done) {
app.stop().then(function() { done(); });
});
describe("Set port 8090", function () {
before(function() {
// Set config sample for use in this test
process.env.MM_CONFIG_FILE = "tests/configs/port_8090.js";
});
it("should return 200", function (done) {
request.get("http://localhost:8090", function (err, res, body) {
expect(res.statusCode).to.equal(200);
done();
});
});
});
});