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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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,