feat: add comprehensive end-to-end test suite
This commit is contained in:
committed by
Loic Coenen (aider)
parent
af7588b832
commit
18eb27e9c8
64
e2e/test_main.ts
Normal file
64
e2e/test_main.ts
Normal file
@@ -0,0 +1,64 @@
|
||||
import { testGridNavigation } from './test_grid_navigation';
|
||||
import { testChannelAddRemove } from './test_channel_add_remove';
|
||||
import { testToggleRecordStop } from './test_toggle_record_stop';
|
||||
import { testTUIRecordAndLoop } from './test_tui_record_and_loop';
|
||||
import { testRecordOnSelectedCell } from './test_record_on_selected_cell';
|
||||
import { testSaveLoad } from './test_save_load';
|
||||
import { testRecordOnMissingChannel } from './test_record_on_missing_channel';
|
||||
import { testRapidKeyMashConsistency } from './test_rapid_key_mash';
|
||||
import { testRecordOnHighRow } from './test_record_on_high_row';
|
||||
import { testFromToAudioPass } from './test_from_to_audio_pass';
|
||||
import { testRecordMoveRecord } from './test_record_move_record';
|
||||
import { testStressRandomUsage } from './test_stress_random';
|
||||
import { testKeyPressLatency } from './test_key_press_latency';
|
||||
import { testStatusFifoLevelLine } from './test_status_fifo_level';
|
||||
import { testVUMeter } from './test_vu_meter';
|
||||
|
||||
async function main(): Promise<void> {
|
||||
console.log("=== Looper E2E Tests ===\n");
|
||||
|
||||
const tests = [
|
||||
testGridNavigation,
|
||||
testChannelAddRemove,
|
||||
testToggleRecordStop,
|
||||
testTUIRecordAndLoop,
|
||||
testRecordOnSelectedCell,
|
||||
testSaveLoad,
|
||||
testRecordOnMissingChannel,
|
||||
testRapidKeyMashConsistency,
|
||||
testRecordOnHighRow,
|
||||
testFromToAudioPass,
|
||||
testRecordMoveRecord,
|
||||
testStressRandomUsage,
|
||||
testKeyPressLatency,
|
||||
testStatusFifoLevelLine,
|
||||
testVUMeter,
|
||||
];
|
||||
let passCount = 0;
|
||||
let failCount = 0;
|
||||
|
||||
for (const testFn of tests) {
|
||||
process.stdout.write("\n");
|
||||
try {
|
||||
await Promise.race([
|
||||
testFn(),
|
||||
new Promise<void>((_, reject) => setTimeout(() => reject(new Error("Test timed out")), 600000))
|
||||
]);
|
||||
passCount++;
|
||||
} catch (e: any) {
|
||||
console.log(` ERROR: ${e.message}`);
|
||||
failCount++;
|
||||
}
|
||||
}
|
||||
|
||||
console.log(`\n=== Results: ${passCount} passed, ${failCount} failed ===`);
|
||||
if (failCount > 0) {
|
||||
process.exit(1);
|
||||
}
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
main().catch((e) => {
|
||||
console.error("Unhandled error:", e);
|
||||
process.exit(1);
|
||||
});
|
||||
Reference in New Issue
Block a user