MagicMirror/tests/e2e/template_spec.js
Kristjan ESPERANTO 4bbd35fa6a
Use node prefix for build-in modules (#3340)
It is basically a cosmetic thing, but has the following advantages:

1. Consistency with the official node documentation. The prefix is used
there.
2. It is easier to recognize the build-in modules.
2024-01-08 17:45:54 +01:00

22 lines
533 B
JavaScript

const fs = require("node:fs");
const helpers = require("./helpers/global-setup");
describe("templated config with port variable", () => {
beforeAll(async () => {
await helpers.startApplication("tests/configs/port_variable.js");
});
afterAll(async () => {
await helpers.stopApplication();
try {
fs.unlinkSync("tests/configs/port_variable.js");
} catch (err) {
// do nothing
}
});
it("should return 200", async () => {
const res = await fetch("http://localhost:8090");
expect(res.status).toBe(200);
});
});