mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-12-02 14:51:20 -05:00
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.
This commit is contained in:
@@ -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 = <a/>; x.async::b", &options).is_ok());
|
||||
let mut r = Realm::with_options(options, Limits::default());
|
||||
let src = "var async = new Namespace('u'); var x = <a xmlns:p='u'><p:b>7</p:b><b>8</b></a>; String(x.async::b)";
|
||||
assert_eq!(r.run(src), Ok(JsValue::String("7".into())));
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user