feat(m1): foundations — queue engine, costs, stub content #13

Merged
ginnoir merged 12 commits from feat/m1-foundations into main 2026-06-11 18:28:16 -05:00
Showing only changes of commit 37f4460eaa - Show all commits
+26
View File
@@ -0,0 +1,26 @@
import { readdir, readFile } from 'node:fs/promises';
import { join } from 'node:path';
import { describe, expect, it } from 'vitest';
const ENGINE_DIR = join(import.meta.dirname, '..');
const FORBIDDEN = [/from\s+['"]react/, /from\s+['"]react-dom/, /from\s+['"]zustand/];
async function engineSourceFiles(): Promise<string[]> {
const entries = await readdir(ENGINE_DIR, { withFileTypes: true });
return entries
.filter((e) => e.isFile() && e.name.endsWith('.ts') && !e.name.endsWith('.test.ts'))
.map((e) => join(ENGINE_DIR, e.name));
}
describe('engine purity', () => {
it('does not import React, react-dom, or Zustand', async () => {
const files = await engineSourceFiles();
expect(files.length).toBeGreaterThan(0);
for (const file of files) {
const source = await readFile(file, 'utf8');
for (const pattern of FORBIDDEN) {
expect(source, `${file} must stay free of ${pattern}`).not.toMatch(pattern);
}
}
});
});