mirror of
https://github.com/moltbot/moltbot.git
synced 2026-05-07 07:58:36 +00:00
test: stabilize release test shards
This commit is contained in:
@@ -247,9 +247,14 @@ describe("buildWorkspaceSkillSnapshot", () => {
|
||||
);
|
||||
|
||||
// We should only have loaded a small subset.
|
||||
expect(snapshot.skills.length).toBeLessThanOrEqual(5);
|
||||
expect(snapshot.prompt).toContain("repo-skill-00");
|
||||
expect(snapshot.prompt).not.toContain("repo-skill-07");
|
||||
const skillNames = snapshot.skills.map((skill) => skill.name);
|
||||
expect(skillNames.length).toBeGreaterThan(0);
|
||||
expect(skillNames.length).toBeLessThanOrEqual(5);
|
||||
expect(new Set(skillNames).size).toBe(skillNames.length);
|
||||
for (const name of skillNames) {
|
||||
expect(name).toMatch(/^repo-skill-\d{2}$/);
|
||||
expect(snapshot.prompt).toContain(name);
|
||||
}
|
||||
});
|
||||
|
||||
it("skips skills whose SKILL.md exceeds maxSkillFileBytes", async () => {
|
||||
|
||||
@@ -591,10 +591,11 @@ export function syncUrlWithTab(host: SettingsHost, tab: Tab, replace: boolean) {
|
||||
}
|
||||
|
||||
export function syncUrlWithSessionKey(host: SettingsHost, sessionKey: string, replace: boolean) {
|
||||
if (typeof window === "undefined") {
|
||||
const href = typeof window === "undefined" ? undefined : window.location?.href;
|
||||
if (!href) {
|
||||
return;
|
||||
}
|
||||
const url = new URL(window.location.href);
|
||||
const url = new URL(href);
|
||||
url.searchParams.set("session", sessionKey);
|
||||
updateBrowserHistory(url, replace);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user