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
@@ -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();