Skip to content

Commit 774ac06

Browse files
committed
Fix test
1 parent 36ce124 commit 774ac06

File tree

1 file changed

+22
-16
lines changed

1 file changed

+22
-16
lines changed

__tests__/html/hooks.useActiveTyping.html

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -90,22 +90,28 @@
9090
await pageObjects.typeInSendBox('.');
9191

9292
// THEN: `useActiveTyping` should return both.
93-
await expect(renderWithFunction(() => Object.values(useActiveTyping()[0]))).resolves.toEqual([
94-
{
95-
at: 600,
96-
expireAt: 5600,
97-
name: expect.any(String),
98-
role: 'bot',
99-
type: 'busy'
100-
},
101-
{
102-
at: 600,
103-
expireAt: 5600,
104-
name: expect.any(String),
105-
role: 'user',
106-
type: 'busy'
107-
}
108-
]);
93+
const hookResult = await renderWithFunction(() => Object.values(useActiveTyping()[0]));
94+
95+
expect(hookResult).toHaveLength(2);
96+
97+
expect(hookResult).toEqual(
98+
expect.arrayContaining([
99+
{
100+
at: 600,
101+
expireAt: 5600,
102+
name: expect.any(String),
103+
role: 'bot',
104+
type: 'busy'
105+
},
106+
{
107+
at: 600,
108+
expireAt: 5600,
109+
name: expect.any(String),
110+
role: 'user',
111+
type: 'busy'
112+
}
113+
])
114+
);
109115
});
110116
</script>
111117
</body>

0 commit comments

Comments
 (0)