feat: optimize datalink metadata display, fix field mapping schema, bill timeout and cli options
This commit is contained in:
1 parent
fbdb38bfb2
commit
a5f685045e
13 files changed
+254
-40
No files matched your search
@@ -164,6 +164,27 @@ describe("workflow-script - 本地静态语法校验与沙箱仿真引擎", () =
|
||||
expect(res.durationMs).toBeGreaterThanOrEqual(0);
|
||||
});
|
||||
|
||||
it("supports accessing variables through inputs namespace as well as top-level globals", async () => {
|
||||
const code = `
|
||||
return {
|
||||
direct: foo,
|
||||
viaNamespace: inputs.foo,
|
||||
nested: inputs.nested.value
|
||||
};
|
||||
`;
|
||||
const inputs = {
|
||||
foo: "bar",
|
||||
nested: { value: 42 }
|
||||
};
|
||||
const res = await executeJavaScriptSandbox(code, inputs);
|
||||
expect(res.success).toBe(true);
|
||||
expect(res.returnValue).toEqual({
|
||||
direct: "bar",
|
||||
viaNamespace: "bar",
|
||||
nested: 42
|
||||
});
|
||||
});
|
||||
|
||||
it("catches runtime errors and reports line number", async () => {
|
||||
const code = `
|
||||
const a = 10;
|
||||
|
||||
Reference in new issue
Block a user