Loosen metatdata test matcher (#52007)
the metadata tests have an unnecessarily strict matcher which will fail if the matched metadata isn't the first instance of the element tag type. This will cause a problem when we start to preload bootstrap scripts which will cause preload links in all test cases that did not come from the metadata api itself Co-authored-by: Jiachi Liu <4800338+huozhi@users.noreply.github.com>
This commit is contained in:
parent
0fb5fa550c
commit
d02f60b998
1 changed files with 3 additions and 1 deletions
|
@ -31,7 +31,9 @@ createNextDescribe(
|
|||
if (Array.isArray(expected)) {
|
||||
expect(values).toEqual(expected)
|
||||
} else {
|
||||
expect(values[0]).toBe(expected)
|
||||
// If expected is undefined, then it should not exist.
|
||||
// Otherwise, it should exist in the matched values.
|
||||
expect(values.includes(expected)).toBe(expected !== undefined)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue