Skip to content

Commit 990a128

Browse files
committed
fix: assert thrown error correctly
1 parent e2e309f commit 990a128

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

packages/compass-indexes/src/components/regular-indexes-table/regular-index-actions.spec.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,12 @@ describe('IndexActions Component', function () {
5555
);
5656

5757
// Should not show building spinner or percentage
58-
expect(() => screen.getByTestId('index-building-spinner')).to.throw;
59-
expect(() => screen.getByText(/Building\.\.\. \d+%/)).to.throw;
58+
expect(() => screen.getByTestId('index-building-spinner')).to.throw(
59+
/Unable to find/
60+
);
61+
expect(() => screen.getByText(/Building\.\.\. \d+%/)).to.throw(
62+
/Unable to find/
63+
);
6064
});
6165

6266
it('displays progress percentage when buildProgress is 50% (0.5)', function () {

0 commit comments

Comments
 (0)