2024-03-16 22:29:24 +08:00
|
|
|
import { YAML } from "../../lib/deps_server.ts";
|
2023-07-26 23:12:56 +08:00
|
|
|
|
2024-07-30 23:24:17 +08:00
|
|
|
// @ts-ignore: syscall is a global function
|
2023-07-26 23:12:56 +08:00
|
|
|
globalThis.syscall = (name: string, ...args: readonly any[]) => {
|
|
|
|
switch (name) {
|
|
|
|
case "yaml.parse":
|
2024-03-16 22:29:24 +08:00
|
|
|
return Promise.resolve(YAML.parse(args[0]));
|
2024-02-28 03:05:12 +08:00
|
|
|
case "system.applyAttributeExtractors":
|
|
|
|
return Promise.resolve({});
|
2023-07-26 23:12:56 +08:00
|
|
|
default:
|
|
|
|
throw Error(`Not implemented in tests: ${name}`);
|
|
|
|
}
|
|
|
|
};
|