mirror of
https://github.com/agentscope-ai/ReMe.git
synced 2026-09-15 23:31:05 +00:00
Some checks failed
Security / CodeQL / Analyze javascript-typescript (push) Has been cancelled
Deploy / Documentation / Build documentation (push) Has been cancelled
CI / Documentation / Test and build documentation (push) Has been cancelled
CI / Python packages / Build and verify distributions (push) Has been cancelled
CI / Python tests / Unit Tests - py3.11 (push) Has been cancelled
CI / Python tests / Unit Tests - py3.13 (push) Has been cancelled
Security / CodeQL / Analyze python (push) Has been cancelled
CI / Python quality / Pre-commit (push) Has been cancelled
CI / Python tests / Unit Tests - py3.12 (push) Has been cancelled
CI / Windows / CLI smoke - py3.11 (push) Has been cancelled
Deploy / Documentation / deploy (push) Has been cancelled
25 lines
1.1 KiB
JavaScript
25 lines
1.1 KiB
JavaScript
import assert from "node:assert/strict";
|
|
import fs from "node:fs";
|
|
import path from "node:path";
|
|
import test from "node:test";
|
|
import { fileURLToPath } from "node:url";
|
|
|
|
const repositoryRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../..");
|
|
const homePage = fs.readFileSync(path.join(repositoryRoot, "docs/.vitepress/theme/HomePage.vue"), "utf8");
|
|
const trafficPage = fs.readFileSync(path.join(repositoryRoot, "docs/.vitepress/theme/TrafficPage.vue"), "utf8");
|
|
|
|
test("home dark-mode selectors keep their component target when scoped styles compile", () => {
|
|
assert.doesNotMatch(homePage, /:global\(\.dark\)\s+/);
|
|
assert.match(homePage, /:global\(html\.dark \.reme-home\)/);
|
|
assert.match(homePage, /:global\(html\.dark \.home-stage::before\)/);
|
|
});
|
|
|
|
test("embedded traffic dashboards follow the selected site theme", () => {
|
|
for (const component of [homePage, trafficPage]) {
|
|
assert.match(component, /theme=\$\{isDark\.value \? "dark" : "light"\}/);
|
|
}
|
|
});
|
|
|
|
test("the home overview action opens the localized project README", () => {
|
|
assert.match(homePage, /localLink\(`\/\$\{lang\}\/overview`\)/);
|
|
});
|