Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLeitwolf112026-09-26 00:33:21 +0300
committerLeitwolf112026-09-26 00:33:21 +0300
commite21de6d255b041fca036c9599332c7a42548617a (patch)
tree7eab26d60840cf3a0e8488ca6161c11af18bae7d
parentfdc9a91dec3433ebc3eae480cf6b57153d0972fb (diff)
downloadwebsite-e21de6d255b041fca036c9599332c7a42548617a.tar.gz
Make website link and example integrity tests independent of a sibling compiler checkout in CI while retaining local cross-repository checks
-rw-r--r--frontend/tests/site-integrity.test.mjs15
1 files changed, 12 insertions, 3 deletions
diff --git a/frontend/tests/site-integrity.test.mjs b/frontend/tests/site-integrity.test.mjs
index 69995df..6af118e 100644
--- a/frontend/tests/site-integrity.test.mjs
+++ b/frontend/tests/site-integrity.test.mjs
@@ -78,8 +78,12 @@ test("the site has no retired public login or registry links", () => {
}
});
-test("every linked repository path used by the guides exists locally", () => {
+test("every linked repository path used by the guides exists when compiler source is available", (context) => {
const compilerRoot = join(websiteRoot, "..");
+ if (!existsSync(join(compilerRoot, "Spec"))) {
+ context.skip("standalone website checkout has no sibling compiler repository");
+ return;
+ }
for (const relativePath of [
"Spec",
"Documents/BUILDING.md",
@@ -90,9 +94,14 @@ test("every linked repository path used by the guides exists locally", () => {
}
});
-test("the site example is copied from the compiler repository", () => {
+test("the site example is copied from the compiler repository when available", (context) => {
const compilerRoot = join(websiteRoot, "..");
- const source = readFileSync(join(compilerRoot, "Examples/HelloWorld/HelloWorld.vxs"), "utf8");
+ const examplePath = join(compilerRoot, "Examples/HelloWorld/HelloWorld.vxs");
+ if (!existsSync(examplePath)) {
+ context.skip("standalone website checkout has no sibling compiler repository");
+ return;
+ }
+ const source = readFileSync(examplePath, "utf8");
const program = source
.slice(source.indexOf("namespace Examples.HelloWorld;"))
.replaceAll("\r\n", "\n")