LibJS: Do not fail a test if the flags list is empty

There are hundreds of test262 tests with the following metadata line:

    flags: []

Other engine runners are apparently able to ignore those lines, so we
should as well.
This commit is contained in:
Timothy Flynn 2023-06-23 11:26:44 -04:00 committed by Andreas Kling
parent b0ef956fe0
commit e7db199249
Notes: sideshowbarker 2024-07-17 04:09:56 +09:00

View File

@ -349,11 +349,6 @@ static Result<TestMetadata, DeprecatedString> extract_metadata(StringView source
if (line.starts_with("flags:"sv)) {
auto flags = parse_list(line);
if (flags.is_empty()) {
failed_message = DeprecatedString::formatted("Failed to find flags in '{}'", line);
break;
}
for (auto flag : flags) {
if (flag == "raw"sv) {
metadata.strict_mode = StrictMode::NoStrict;