feat: 注入 harness 并补齐关键全局内建

This commit is contained in:
2026-06-09 17:08:10 +08:00
parent a654b5834f
commit ff6853face
13 changed files with 209 additions and 48 deletions
@@ -36,7 +36,7 @@ fn function_to_string_includes_function() {
let result = eval(&mut vm, "Math.max.toString()").unwrap();
assert!(result.is_string());
let rendered = vm.kernel().string_forge().lookup(result.as_string_index()).unwrap_or_default();
assert!(rendered.contains("function"), "got: {}", rendered);
assert_eq!(rendered, "function max() { [native code] }");
}
#[test]