Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

port_config.js 907B

123456789101112131415161718192021222324252627282930313233343536
  1. const fetch = require("node-fetch");
  2. const helpers = require("./global-setup");
  3. describe("port directive configuration", function () {
  4. describe("Set port 8090", function () {
  5. beforeAll(function () {
  6. helpers.startApplication("tests/configs/port_8090.js");
  7. });
  8. afterAll(function () {
  9. helpers.stopApplication();
  10. });
  11. it("should return 200", function (done) {
  12. fetch("http://localhost:8090").then((res) => {
  13. expect(res.status).toBe(200);
  14. done();
  15. });
  16. });
  17. });
  18. describe("Set port 8100 on environment variable MM_PORT", function () {
  19. beforeAll(function () {
  20. helpers.startApplication("tests/configs/port_8090.js", (process.env.MM_PORT = 8100));
  21. });
  22. afterAll(function () {
  23. helpers.stopApplication();
  24. });
  25. it("should return 200", function (done) {
  26. fetch("http://localhost:8100").then((res) => {
  27. expect(res.status).toBe(200);
  28. done();
  29. });
  30. });
  31. });
  32. });