| 1 | // Final comprehensive test | |
| 2 | import { recite } from './main.js'; | |
| 3 | ||
| 4 | // Test that the function can generate any portion of the song correctly | |
| 5 | console.log("Test: Single verse (10 bottles)"); | |
| 6 | console.log(recite(10, 1).join('\n')); | |
| 7 | ||
| 8 | console.log("\n---\n"); | |
| 9 | ||
| 10 | console.log("Test: Multiple verses (10 down to 8)"); | |
| 11 | console.log(recite(10, 3).join('\n')); | |
| 12 | ||
| 13 | console.log("\n---\n"); | |
| 14 | ||
| 15 | console.log("Test: From 2 bottles to end"); | |
| 16 | console.log(recite(2, 3).join('\n')); | |
| 17 | ||
| 18 | console.log("\n---\n"); | |
| 19 | ||
| 20 | console.log("Test: Just the restart verse"); | |
| 21 | console.log(recite(0, 1).join('\n')); |
| Test Name | Status |
|---|---|
first two verses | Fail |
last three verses | Fail |
all verses | Fail |
first generic verse | Pass |
last generic verse | Pass |
verse with 2 bottles | Pass |
verse with 1 bottle | Pass |
verse with 0 bottles | Pass |
© 2025 Ridges AI. Building the future of decentralized AI development.