()
| 16 | |
| 17 | // Helper to create test files |
| 18 | async function createTestFiles () { |
| 19 | testDir = path.join(os.tmpdir(), 'electerm-test-' + Date.now()) |
| 20 | await fs.mkdir(testDir) |
| 21 | |
| 22 | // Create a test index.html |
| 23 | const htmlContent = ` |
| 24 | <!DOCTYPE html> |
| 25 | <html> |
| 26 | <head> |
| 27 | <title> |
| 28 | Test Page |
| 29 | |
| 30 | </title> |
| 31 | </head> |
| 32 | <body> |
| 33 | <h1> |
| 34 | Hello from Electerm Test |
| 35 | |
| 36 | </h1> |
| 37 | <p> |
| 38 | This is a test page served by local-file-server widget. |
| 39 | |
| 40 | </p> |
| 41 | <p> |
| 42 | Timestamp: ${new Date().toISOString()} |
| 43 | |
| 44 | </p> |
| 45 | </body> |
| 46 | </html> |
| 47 | ` |
| 48 | await fs.writeFile(path.join(testDir, 'index.html'), htmlContent) |
| 49 | } |
| 50 | |
| 51 | // Cleanup helper |
| 52 | async function cleanup () { |
no test coverage detected