Add desktop compatibility-surface guard tests
Co-authored-by: Theo Browne <[email protected]>
This commit is contained in:
1 parent
e67d936a37
commit
d6d3e6985b
1 file changed
+23
@@ -0,0 +1,23 @@
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
const WRAPPER_FILES = [
|
||||
"processManager.ts",
|
||||
"todoStore.ts",
|
||||
"providerManager.ts",
|
||||
"codexAppServerManager.ts",
|
||||
] as const;
|
||||
|
||||
describe("desktop runtime compatibility surface", () => {
|
||||
for (const fileName of WRAPPER_FILES) {
|
||||
it(`${fileName} re-exports from runtime-core`, () => {
|
||||
const filePath = path.resolve(import.meta.dirname, fileName);
|
||||
const source = fs.readFileSync(filePath, "utf8");
|
||||
|
||||
expect(source).toContain("@acme/runtime-core");
|
||||
expect(source).toContain("export {");
|
||||
expect(source).not.toContain("class ");
|
||||
});
|
||||
}
|
||||
});
|
||||
Reference in new issue
Block a user