Files
hyperframes/packages/core/src/projectRule.test.ts
Miguel Ángel e738e10267 feat(core): export findProjects to list the HyperFrames projects on a machine (#4627)
* feat(cli): hyperframes projects finds the HyperFrames projects on this machine

* refactor(core): keep the project rule's comment share under its package's

* fix(cli): projects keeps Spotlight hits under a symlinked root and refuses a missing root

* style(cli): format the projects walker and its tests

* fix(cli): projects tests pass under a symlinked temp folder and a bad root errors on stderr

* test(cli): projects tests hold on Windows and cover an unreadable root

* style(cli): format the projects command and tests

* refactor(cli): split the projects Spotlight check and regenerate the skills manifest

* refactor(core): findProjects moves to @hyperframes/core/projects so Desktop can import it

* chore(core): publish the projects subpath

* fix(core): findProjects fails on a root it cannot read instead of finding nothing

* docs(core): name the project marker writers without naming one app

* refactor(core): ship findProjects as a core export only, with no CLI command

* feat(core): findProjects stops on an abort signal and defaults to the home folder

* fix(core): findProjects checks an aborted signal first and stops when onProject throws
2026-09-28 06:09:25 +00:00

17 lines
612 B
TypeScript

import { describe, expect, it } from "vitest";
import { isHyperframesProject } from "./projectRule";
describe("isHyperframesProject", () => {
it.each(["hyperframes.json", "meta.json", "project.json"])(
"counts a folder with index.html and %s",
(marker) => {
expect(isHyperframesProject(["index.html", marker, "assets"])).toBe(true);
},
);
it("does not count index.html alone, or a marker without index.html", () => {
expect(isHyperframesProject(["index.html", "package.json"])).toBe(false);
expect(isHyperframesProject(["hyperframes.json", "README.md"])).toBe(false);
});
});