feat(org-chart): add core cards and fixed-layout integration
This commit is contained in:
1 parent
d18e3c3380
commit
61c6f8d1f1
161 files changed
+13044
-1
No files matched your search
@@ -0,0 +1,17 @@
|
||||
import { build } from 'vite';
|
||||
import { globSync } from 'node:fs';
|
||||
import { execFileSync } from 'node:child_process';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import path from 'node:path';
|
||||
const root = fileURLToPath(new URL('./', import.meta.url));
|
||||
// Optional exact paths let a change run only its affected tests; default keeps
|
||||
// the existing full data test command and discovery unchanged.
|
||||
const selected = process.argv.slice(2).map(file => file.replaceAll('\\', '/'));
|
||||
const tests = [...globSync('src/**/*.test.ts', { cwd: root })].filter(file => !selected.length || selected.includes(file.replaceAll('\\', '/')));
|
||||
if (!tests.length) throw new Error('No OrgChart data tests found');
|
||||
await build({ configFile: false, root, publicDir: false, build: {
|
||||
outDir: '../../test-results/org-chart-unit', emptyOutDir: true, target: 'node22', minify: false,
|
||||
lib: { entry: Object.fromEntries(tests.map((file, i) => [`test-${i}`, path.join(root, file)])), formats: ['es'], fileName: (_, entry) => `${entry}.mjs` },
|
||||
rolldownOptions: { external: [/^node:/] },
|
||||
} });
|
||||
execFileSync(process.execPath, ['--test', ...tests.map((_, i) => path.join(root, '../../test-results/org-chart-unit', `test-${i}.mjs`))], { stdio: 'inherit' });
|
||||
Reference in new issue
Block a user