mirror of
https://github.com/fancive/obsidian-parallel-reader.git
synced 2026-07-22 06:53:43 +00:00
Add tests/**/*.js and scripts/**/*.mjs to biome.json includes and update npm lint scripts to cover these directories. Auto-fixed all formatting issues in 26 files. Change-Id: I8c2763cb9683616a8abc1484d91bf8af79bb590e
24 lines
577 B
JavaScript
24 lines
577 B
JavaScript
import { execSync } from 'child_process';
|
|
import { readdirSync } from 'fs';
|
|
import { join } from 'path';
|
|
|
|
const testsDir = join(import.meta.dirname, '..', 'tests');
|
|
const files = readdirSync(testsDir)
|
|
.filter((f) => f.endsWith('.test.js'))
|
|
.sort();
|
|
|
|
let failed = 0;
|
|
for (const file of files) {
|
|
const path = join(testsDir, file);
|
|
try {
|
|
execSync(`node ${path}`, { stdio: 'inherit' });
|
|
} catch {
|
|
failed++;
|
|
}
|
|
}
|
|
|
|
if (failed > 0) {
|
|
console.error(`\n${failed} test file(s) failed.`);
|
|
process.exit(1);
|
|
}
|
|
console.log(`\nAll ${files.length} test files passed.`);
|