mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-11-05 18:44:06 +08:00
update 2026-10-14 04:56:49
This commit is contained in:
1 parent
1e69cad46b
commit
c90a1f4fc1
766 files changed
+181363
-31
No files matched your search
@@ -0,0 +1,32 @@
|
||||
import assert from "node:assert/strict";
|
||||
import { readFileSync } from "node:fs";
|
||||
import { resolve } from "node:path";
|
||||
import test from "node:test";
|
||||
|
||||
const projectRoot = resolve(import.meta.dirname, "../..");
|
||||
const source = (path) => readFileSync(resolve(projectRoot, path), "utf8");
|
||||
|
||||
test("navigation transitions avoid blanket and full-page layout animation", () => {
|
||||
const nav = source(".dev/src/media/components/_nav.css");
|
||||
const layout = source(".dev/src/media/_layout.css");
|
||||
|
||||
assert.doesNotMatch(nav, /\btransition-all\b/);
|
||||
assert.doesNotMatch(layout, /transition-\[grid-template-columns\]/);
|
||||
});
|
||||
|
||||
test("login effects do not reserve compositor layers permanently", () => {
|
||||
const login = source(".dev/src/media/login.css");
|
||||
assert.doesNotMatch(login, /\[will-change:opacity\]/);
|
||||
});
|
||||
|
||||
test("login template reuses server data when including the header", () => {
|
||||
const sysauth = source("ucode/template/themes/aurora/sysauth.ut");
|
||||
const header = source("ucode/template/themes/aurora/header.ut");
|
||||
|
||||
assert.match(
|
||||
sysauth,
|
||||
/include\('header',\s*\{[^}]*prefetched_boardinfo:\s*boardinfo[^}]*prefetched_tokens:\s*themeTokens[^}]*\}\)/s,
|
||||
);
|
||||
assert.match(header, /prefetched_boardinfo\s*\?\?/);
|
||||
assert.match(header, /prefetched_tokens\s*\?\?/);
|
||||
});
|
||||
Reference in new issue
Block a user