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

This commit is contained in:
爱特每羊队
2026-06-09 17:08:10 +08:00
parent ed0864d01f
commit d20eadaccc
13 changed files with 209 additions and 48 deletions
@@ -187,6 +187,15 @@ fn array_empty_literal() {
assert_eq!(obj.prop_count(), 0);
}
#[test]
fn array_is_array_static_method() {
let (_vm, result) = eval("Array.isArray([])").unwrap();
assert_eq!(result, JsValue::bool(true));
let (_vm, result) = eval("Array.isArray({})").unwrap();
assert_eq!(result, JsValue::bool(false));
}
#[test]
fn array_shift_removes_first() {
let (_vm, result) = eval("[1,2,3].shift()").unwrap();