test : just complete
CI / Verify (push) Successful in 1m30s
CI / Build immutable images and deploy (push) Successful in 2m34s

This commit is contained in:
2026-09-22 18:49:54 +07:00 Unverified
parent 1d36167011
commit 41da2478ac
6 changed files with 48 additions and 29 deletions
+8 -5
View File
@@ -1,13 +1,16 @@
import { readFile } from "node:fs/promises";
import { describe, expect, it, vi } from "vitest";
import { afterAll, describe, expect, it } from "vitest";
vi.hoisted(() => {
vi.stubEnv("BASE_URL", "https://guide.example.test");
const originalBaseUrl = process.env.BASE_URL;
process.env.BASE_URL = "https://guide.example.test";
const { default: robots } = await import("@/app/robots");
afterAll(() => {
if (originalBaseUrl === undefined) delete process.env.BASE_URL;
else process.env.BASE_URL = originalBaseUrl;
});
import robots from "@/app/robots";
async function repositoryFile(path: string): Promise<string> {
return readFile(new URL(`../${path}`, import.meta.url), "utf8");
}