mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-27 00:16:44 +00:00
simplify install and maintaining dependencies (#3795)
I was always unhappy when maintaining dependency updates to have 3 `package.json` files. This PR moves all deps into the main `package.json` and removes the folders `fonts` and `vendor`. If accepted I will update the docs too. --------- Co-authored-by: Kristjan ESPERANTO <35647502+KristjanESPERANTO@users.noreply.github.com>
This commit is contained in:
@@ -3,7 +3,7 @@ const helpers = require("./helpers/global-setup");
|
||||
describe("All font files from roboto.css should be downloadable", () => {
|
||||
const fontFiles = [];
|
||||
// Statements below filters out all 'url' lines in the CSS file
|
||||
const fileContent = require("node:fs").readFileSync(`${__dirname}/../../fonts/roboto.css`, "utf8");
|
||||
const fileContent = require("node:fs").readFileSync(`${__dirname}/../../css/roboto.css`, "utf8");
|
||||
const regex = /\burl\(['"]([^'"]+)['"]\)/g;
|
||||
let match = regex.exec(fileContent);
|
||||
while (match !== null) {
|
||||
|
@@ -9,22 +9,14 @@ describe("Vendors", () => {
|
||||
});
|
||||
|
||||
describe("Get list vendors", () => {
|
||||
const vendors = require(`${__dirname}/../../vendor/vendor.js`);
|
||||
const vendors = require(`${__dirname}/../../js/vendor.js`);
|
||||
|
||||
Object.keys(vendors).forEach((vendor) => {
|
||||
it(`should return 200 HTTP code for vendor "${vendor}"`, async () => {
|
||||
const urlVendor = `http://localhost:8080/vendor/${vendors[vendor]}`;
|
||||
const urlVendor = `http://localhost:8080/${vendors[vendor]}`;
|
||||
const res = await fetch(urlVendor);
|
||||
expect(res.status).toBe(200);
|
||||
});
|
||||
});
|
||||
|
||||
Object.keys(vendors).forEach((vendor) => {
|
||||
it(`should return 404 HTTP code for vendor https://localhost/"${vendor}"`, async () => {
|
||||
const urlVendor = `http://localhost:8080/${vendors[vendor]}`;
|
||||
const res = await fetch(urlVendor);
|
||||
expect(res.status).toBe(404);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user