Skip to content

Commit

Permalink
stream.test file cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
benlife5 committed Aug 28, 2024
1 parent 63cdfda commit 48c0b28
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions packages/pages/src/common/src/feature/stream.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { describe, it, expect, vi } from "vitest";
import { describe, it, expect, vi, afterEach } from "vitest";
import {
convertTemplateConfigToStreamConfig,
StreamConfig,
Expand Down Expand Up @@ -96,6 +96,16 @@ describe("formatSiteStream", () => {
});

describe("readSiteStream", () => {
afterEach(() => {
if (fs.existsSync("config.yaml")) {
fs.rmSync("config.yaml");
}
if (fs.existsSync("sites-config/site-stream.json")) {
fs.rmSync("sites-config/site-stream.json");
fs.rmdirSync("sites-config");
}
});

const projectStructure = new ProjectStructure({});

it("reads siteStream from config.yaml", () => {
Expand All @@ -119,7 +129,6 @@ describe("readSiteStream", () => {
fields: ["c_visualLayouts.c_visualConfiguration"],
localization: { locales: ["en"] },
});
fs.rmSync(path);
});

it("reads siteStream from config.yaml", () => {
Expand All @@ -146,7 +155,5 @@ describe("readSiteStream", () => {
fields: ["c_visualLayouts.c_visualConfiguration"],
localization: { locales: ["en"] },
});
fs.rmSync(path);
fs.rmdirSync("sites-config");
});
});

0 comments on commit 48c0b28

Please sign in to comment.