1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:27:35 +00:00

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

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;