mirror of
https://github.com/pjh456/OxideJS.git
synced 2026-10-24 02:31:13 +08:00
feat: 注入 harness 并补齐关键全局内建
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user