Files
metapi/vitest.config.ts
T
45fe687c0d 增加了空回为失败和自定义失败关键词的功能,修复了机器人提出的问题 (#153)
* Add proxy failure rules for keywords and empty responses

* fix(proxy): detect failure keywords for streamed chat responses

* Fix(tester): treat empty stream output as error

* feat(server): default listen host to IPv6 any-address

* fix(proxy): treat empty upstream content as failure

* Revert "feat(server): default listen host to IPv6 any-address"

This reverts commit 2ca49a3891.

* fix(settings): validate proxy failure settings

* fix: address CodeRabbit feedback in proxy failure detection

* test: force NODE_ENV=test for vitest to avoid React act() prod build

* fix(proxy/chat): preserve true SSE streaming (no upstream.text buffering)

* fix: avoid http fallback after hijacked SSE stream

* fix: wire proxy failure detection into chat and responses

---------

Co-authored-by: metapi-bot <metapi-bot@local>
Co-authored-by: openclaw <bot@local>
Co-authored-by: openclaw <openclaw@local>
Co-authored-by: openclaw-executor <executor@openclaw.local>
Co-authored-by: xuyufengfei <xuyufengfei@users.noreply.github.com>
Co-authored-by: cita <juricek.chen@gmail.com>
2026-03-18 22:43:13 +08:00

14 lines
506 B
TypeScript

import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
// Many of our web tests rely on React's test utilities (act, etc.).
// If NODE_ENV is accidentally set to "production" in the environment,
// React switches to the production build where act() is not supported.
// Force a safe default so local/CI runs are stable.
env: {
NODE_ENV: process.env.NODE_ENV && process.env.NODE_ENV !== 'production' ? process.env.NODE_ENV : 'test',
},
},
});