mirror of
https://github.com/hellodigua/ChatLab.git
synced 2026-10-25 17:54:34 +08:00
fix(web): align dev server node runtime
This commit is contained in:
1 parent
eebb428dd3
commit
e3370b52c2
6 files changed
+44
-28
No files matched your search
@@ -0,0 +1,18 @@
|
||||
import assert from 'node:assert/strict'
|
||||
import test from 'node:test'
|
||||
|
||||
import { createChatlabServeCommand } from './dev-server-command.mjs'
|
||||
|
||||
test('web dev backend runs through the current Node executable with the tsx loader', () => {
|
||||
const command = createChatlabServeCommand({
|
||||
rootDir: '/repo',
|
||||
serverDir: '/repo/apps/cli',
|
||||
coreDir: '/repo/packages/core/src',
|
||||
runtimeDir: '/repo/packages/node-runtime/src',
|
||||
backendPort: 3110,
|
||||
nodeExecutable: '/custom/node',
|
||||
})
|
||||
|
||||
assert.equal(command.command, '/custom/node')
|
||||
assert.deepEqual(command.args, ['--watch', '--import', 'tsx', 'src/cli.ts', 'serve', '--port', '3110'])
|
||||
})
|
||||
Reference in new issue
Block a user