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.

root_path_spec.js 983B

12345678910111213141516171819202122232425262728
  1. const fs = require("fs");
  2. const path = require("path");
  3. const root_path = path.join(__dirname, "../../..");
  4. const version = require(`${__dirname}/../../../package.json`).version;
  5. describe("'global.root_path' set in js/app.js", function () {
  6. const expectedSubPaths = ["modules", "serveronly", "js", "js/app.js", "js/main.js", "js/electron.js", "config"];
  7. expectedSubPaths.forEach((subpath) => {
  8. it(`contains a file/folder "${subpath}"`, function () {
  9. expect(fs.existsSync(path.join(root_path, subpath))).toBe(true);
  10. });
  11. });
  12. it("should not modify global.root_path for testing", function () {
  13. expect(global.root_path).toBe(undefined);
  14. });
  15. it("should not modify global.version for testing", function () {
  16. expect(global.version).toBe(undefined);
  17. });
  18. it("should expect the global.version equals package.json file", function () {
  19. const versionPackage = JSON.parse(fs.readFileSync("package.json", "utf8")).version;
  20. expect(version).toBe(versionPackage);
  21. });
  22. });