From 8aa51b123ed28e8d526d0b00a588611921e597eb Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Wed, 2 Dec 2026 10:16:37 -0800 Subject: [PATCH] JS: assert the qualified name's value in the E4X async test CI's test-lint step failed on with_e4x_async_before_a_double_colon_is_a_qualified_name: both of its assertions only checked is_ok. The test now runs x.async::b with async bound to a Namespace and asserts that it selects the namespaced child. --- crates/js/src/async_tests.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/js/src/async_tests.rs b/crates/js/src/async_tests.rs index 711f883633..6438392335 100644 --- a/crates/js/src/async_tests.rs +++ b/crates/js/src/async_tests.rs @@ -121,7 +121,9 @@ fn async_function_inherits_from_the_built_in_function_after_a_script_replaced_it fn with_e4x_async_before_a_double_colon_is_a_qualified_name() { let options = Options { es2017: true, e4x: true, ..Options::default() }; assert!(parse("async::b", &options).is_ok()); - assert!(parse("var x = ; x.async::b", &options).is_ok()); + let mut r = Realm::with_options(options, Limits::default()); + let src = "var async = new Namespace('u'); var x = 78; String(x.async::b)"; + assert_eq!(r.run(src), Ok(JsValue::String("7".into()))); } #[test]