chore: allow multiple tabs (#129)

This commit is contained in:
Pavel Feldman
2025-04-03 19:24:17 -07:00
committed by GitHub
parent b358e47d71
commit e36d4ea695
10 changed files with 354 additions and 92 deletions

View File

@@ -86,10 +86,17 @@ export const expect = baseExpect.extend({
const isNot = this.isNot;
try {
const text = (response.content as any)[0].text;
if (isNot)
baseExpect(text).not.toMatch(content);
else
baseExpect(text).toMatch(content);
if (typeof content === 'string') {
if (isNot)
baseExpect(text.trim()).not.toBe(content.trim());
else
baseExpect(text.trim()).toBe(content.trim());
} else {
if (isNot)
baseExpect(text).not.toMatch(content);
else
baseExpect(text).toMatch(content);
}
} catch (e) {
return {
pass: isNot,