From facbacc27e47bc8d33e86de8584908ebbed52d7a Mon Sep 17 00:00:00 2001 From: Veera <32646674+veera-sivarajan@users.noreply.github.com> Date: Thu, 11 May 2023 05:56:13 -0400 Subject: [PATCH] Fix ES5 selector (#2924) * Check if es6id is found * Check for both esid and es6id --- boa_tester/src/edition.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/boa_tester/src/edition.rs b/boa_tester/src/edition.rs index 8ad0ba873f..aafb18eb4c 100644 --- a/boa_tester/src/edition.rs +++ b/boa_tester/src/edition.rs @@ -341,7 +341,10 @@ impl SpecEdition { pub(crate) fn from_test_metadata(metadata: &MetaData) -> Result> { let mut min_edition = if metadata.flags.contains(&TestFlag::Async) { Self::ES8 - } else if metadata.flags.contains(&TestFlag::Module) { + } else if metadata.flags.contains(&TestFlag::Module) + || metadata.esid.is_some() + || metadata.es6id.is_some() + { Self::ES6 } else { Self::ES5