Skip to content

Commit 0ec2ab4

Browse files
committed
ci: debug log
1 parent a2c6553 commit 0ec2ab4

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

tests/dev_server.spec.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ import { test } from '@japa/runner'
1212
import { cliui } from '@poppinss/cliui'
1313
import { setTimeout as sleep } from 'node:timers/promises'
1414
import { DevServer } from '../index.ts'
15-
import { join } from 'node:path'
15+
import { join, sep } from 'node:path'
16+
import { platform } from 'node:os'
1617

1718
test.group('DevServer', () => {
1819
test('start() and execute dev server hook', async ({ fs, assert, cleanup }) => {
@@ -214,11 +215,16 @@ test.group('DevServer', () => {
214215
}).timeout(8 * 1000)
215216

216217
test('restart server if hot-hook:full-reload message is received', async ({ assert, fs }) => {
217-
const filePath = join(fs.basePath, 'start/routes.ts')
218+
let filePath = join(fs.basePath, 'start/routes.ts')
219+
if (platform() === 'win32') {
220+
filePath = filePath.split(sep).join('\\\\')
221+
console.log({ filePath })
222+
}
223+
218224
await fs.createJson('tsconfig.json', { include: ['**/*'], exclude: [] })
219225
await fs.create(
220226
'bin/server.ts',
221-
`process.send({ type: 'hot-hook:full-reload', path: "${filePath.replace(/\//g, '\\/')}" });`
227+
`process.send({ type: 'hot-hook:full-reload', path: "${filePath}" });`
222228
)
223229
await fs.dump('bin/server.ts')
224230
await fs.create('start/routes.ts', ``)

0 commit comments

Comments
 (0)