Files
PBandDev 2d094554f7 Bundle the pure core API for Node consumers (#6)
* feat: extract pure core api

* refactor: centralize core api helpers

* build: bundle core api output
2026-03-24 12:41:54 -05:00

19 lines
614 B
TypeScript

import { readFileSync } from "node:fs";
import { describe, expect, it } from "vitest";
const sourceFiles = [
new URL("../../src/core.ts", import.meta.url),
new URL("../../src/group-membership.ts", import.meta.url),
new URL("../../src/group-geometry.ts", import.meta.url),
];
describe("pure core source imports", () => {
it("keeps relative TypeScript imports extensionless", () => {
for (const fileUrl of sourceFiles) {
const source = readFileSync(fileUrl, "utf-8");
expect(source).not.toMatch(/from "\.\/.*\.js"/);
expect(source).not.toMatch(/from "\.\.\/.*\.js"/);
}
});
});