test(config): type fresh codex schema import · openclaw/openclaw@f6d3363
steipete
·
2026-05-01
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +import { importFreshModule } from "openclaw/plugin-sdk/test-fixtures"; |
1 | 2 | import { describe, expect, it } from "vitest"; |
2 | 3 | import { validateConfigObjectRaw } from "./validation.js"; |
3 | 4 | |
4 | 5 | describe("web search Codex native config validation", () => { |
5 | 6 | it("accepts tools.web.search.openaiCodex", async () => { |
6 | | -const { OpenClawSchema: freshOpenClawSchema } = |
7 | | -await import("./zod-schema.js?scope=web-search-codex"); |
| 7 | +const { OpenClawSchema: freshOpenClawSchema } = await importFreshModule< |
| 8 | +typeof import("./zod-schema.js") |
| 9 | +>(import.meta.url, "./zod-schema.js?scope=web-search-codex"); |
8 | 10 | const result = freshOpenClawSchema.safeParse({ |
9 | 11 | tools: { |
10 | 12 | web: { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。