feat: 支持 to_string 与错误栈

This commit is contained in:
爱特每羊队
2026-06-08 14:52:44 +08:00
parent 3880882fda
commit a6e448e326
12 changed files with 233 additions and 0 deletions
@@ -32,3 +32,10 @@ fn function_bind_creates_wrapper() {
let result = eval(&mut vm, "var b = Math.max.bind(null, 1); b(5)").unwrap();
assert!((result.as_double() - 5.0).abs() < 0.0001);
}
#[test]
fn function_to_string_includes_function() {
let mut vm = Vm::new();
let result = eval(&mut vm, "Math.max.toString()").unwrap();
assert!(result.is_string());
}