Skip to content

Commit 6d89e4a

Browse files
committed
Address esm module loading issue
1 parent cd6a982 commit 6d89e4a

2 files changed

Lines changed: 10 additions & 3 deletions

File tree

claude-config-composer/tests/cli.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,11 @@ describe('CLI Core Commands', () => {
268268
expect(error).toBeDefined();
269269
} finally {
270270
// Restore permissions for cleanup
271-
await fs.chmod(readOnlyDir, 0o755);
271+
try {
272+
await fs.chmod(readOnlyDir, 0o755);
273+
} catch {
274+
// Directory might not exist, that's ok
275+
}
272276
}
273277
});
274278
});
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
import path from 'path';
22
import { defineConfig } from 'vitest/config';
3+
import { fileURLToPath } from 'url';
4+
5+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
36

47
export default defineConfig({
58
test: {
@@ -16,7 +19,7 @@ export default defineConfig({
1619
coverage: {
1720
provider: 'v8',
1821
reporter: ['text', 'json', 'html'],
19-
exclude: ['tests/**', 'dist/**', 'scripts/**', '**/*.d.ts', 'vitest.config.ts'],
22+
exclude: ['tests/**', 'dist/**', 'scripts/**', '**/*.d.ts', 'vitest.config.ts', 'vitest.config.mjs'],
2023
thresholds: {
2124
global: {
2225
branches: 70,
@@ -35,4 +38,4 @@ export default defineConfig({
3538
'@tests': path.resolve(__dirname, './tests'),
3639
},
3740
},
38-
});
41+
});

0 commit comments

Comments
 (0)