2023-09-22 14:45:46 +02:00
|
|
|
const fs = require("fs");
|
2023-02-12 22:34:57 +01:00
|
|
|
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();
|
2023-09-22 14:45:46 +02:00
|
|
|
try {
|
|
|
|
fs.unlinkSync("tests/configs/port_variable.js");
|
|
|
|
} catch (err) {
|
|
|
|
// do nothing
|
|
|
|
}
|
2023-02-12 22:34:57 +01:00
|
|
|
});
|
|
|
|
|
|
|
|
it("should return 200", async () => {
|
2023-09-09 21:12:31 +02:00
|
|
|
const res = await fetch("http://localhost:8090");
|
2023-02-12 22:34:57 +01:00
|
|
|
expect(res.status).toBe(200);
|
|
|
|
});
|
|
|
|
});
|