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.

env_spec.js 895B

1234567891011121314151617181920212223242526272829303132
  1. const fetch = require("node-fetch");
  2. const helpers = require("./global-setup");
  3. describe("Electron app environment", function () {
  4. beforeAll(function (done) {
  5. helpers.startApplication("tests/configs/default.js");
  6. helpers.getDocument(done);
  7. });
  8. afterAll(function () {
  9. helpers.stopApplication();
  10. });
  11. it("get request from http://localhost:8080 should return 200", function (done) {
  12. fetch("http://localhost:8080").then((res) => {
  13. expect(res.status).toBe(200);
  14. done();
  15. });
  16. });
  17. it("get request from http://localhost:8080/nothing should return 404", function (done) {
  18. fetch("http://localhost:8080/nothing").then((res) => {
  19. expect(res.status).toBe(404);
  20. done();
  21. });
  22. });
  23. it("should show the title MagicMirror²", function () {
  24. const elem = document.querySelector("title");
  25. expect(elem).not.toBe(null);
  26. expect(elem.textContent).toBe("MagicMirror²");
  27. });
  28. });