Skip to content

Commit 4b59336

Browse files
committed
call all to.throw
1 parent 8b51aeb commit 4b59336

File tree

45 files changed

+119
-112
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+119
-112
lines changed

packages/compass-aggregations/src/components/add-stage/add-stage.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ describe('AddStage', function () {
2424
const button = screen.getByTestId('add-stage-icon-button');
2525
expect(() => {
2626
within(button).getByText('Add stage');
27-
}).to.throw;
27+
}).to.throw();
2828
});
2929

3030
it('calls onAddStage with index when clicked', function () {

packages/compass-aggregations/src/components/aggregation-side-panel/stage-wizard-use-cases/group/group-with-subset.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ describe('group with subset', function () {
103103
);
104104
});
105105
it('renders number of records input', function () {
106-
expect(screen.getByTestId('number-of-records-input')).to.throw;
106+
expect(screen.getByTestId('number-of-records-input')).to.throw();
107107
});
108108
});
109109

packages/compass-aggregations/src/components/aggregation-side-panel/stage-wizard-use-cases/match/match-group-form.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ describe('group', function () {
104104
).to.exist;
105105
expect(() =>
106106
screen.getByTestId(TEST_IDS.removeGroupBtn(group.id))
107-
).to.throw;
107+
).to.throw();
108108
});
109109
});
110110

packages/compass-aggregations/src/components/focus-mode/focus-mode-stage-editor.spec.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ describe('FocusMode', function () {
2222
await renderFocusModeStageEditor({ index: -1 });
2323
expect(() => {
2424
screen.getByTestId('stage-operator-combobox');
25-
}).to.throw;
25+
}).to.throw();
2626
expect(() => {
2727
screen.getByText(/open docs/i);
28-
}).to.throw;
28+
}).to.throw();
2929
});
3030

3131
context('when operator is not defined', function () {
@@ -44,7 +44,7 @@ describe('FocusMode', function () {
4444
it('does not render docs link', function () {
4545
expect(() => {
4646
screen.getByText(/open docs/i);
47-
}).to.throw;
47+
}).to.throw();
4848
});
4949
});
5050

packages/compass-aggregations/src/components/focus-mode/focus-mode.spec.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ describe('FocusMode', function () {
2222
await waitFor(() => {
2323
expect(() => {
2424
screen.getByTestId('focus-mode-modal');
25-
}).to.throw;
25+
}).to.throw();
2626
});
2727
});
2828

@@ -44,6 +44,6 @@ describe('FocusMode', function () {
4444

4545
expect(() => {
4646
screen.getByTestId('focus-mode-modal');
47-
}).to.throw;
47+
}).to.throw();
4848
});
4949
});

packages/compass-aggregations/src/components/pipeline-builder-workspace/index.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,6 @@ describe('PipelineBuilderWorkspace', function () {
4747
const container = screen.getByTestId('pipeline-builder-workspace');
4848
expect(() => {
4949
within(container).getByTestId('aggregation-side-panel');
50-
}).to.throw;
50+
}).to.throw();
5151
});
5252
});

packages/compass-aggregations/src/components/pipeline-builder-workspace/pipeline-as-text-workspace/index.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ describe('PipelineAsTextWorkspace', function () {
2626
await renderPipelineAsTextWorkspace({ isAutoPreview: false });
2727
expect(() => {
2828
screen.getByTestId('pipeline-as-text-preview');
29-
}).to.throw;
29+
}).to.throw();
3030
});
3131
});

packages/compass-aggregations/src/components/pipeline-builder-workspace/pipeline-as-text-workspace/pipeline-preview.spec.tsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,11 @@ describe('PipelinePreview', function () {
113113
// By default we don't expand nested props of a document
114114
expect(within(docList).getByText(/_id/)).to.exist;
115115
expect(within(docList).getByText(/score/)).to.exist;
116-
expect(() => within(docList).getByText(/number/)).to.throw;
117-
expect(() => within(docList).getByText(/another/)).to.throw;
118-
expect(() => within(docList).getByText(/deep/)).to.throw;
119-
expect(() => within(docList).getByText(/nested/)).to.throw;
120-
expect(() => within(docList).getByText(/document/)).to.throw;
116+
expect(() => within(docList).getByText(/number/)).to.throw();
117+
expect(() => within(docList).getByText(/another/)).to.throw();
118+
expect(() => within(docList).getByText(/deep/)).to.throw();
119+
expect(() => within(docList).getByText(/nested/)).to.throw();
120+
expect(() => within(docList).getByText(/document/)).to.throw();
121121

122122
// Expand the whole document
123123
userEvent.click(
@@ -153,11 +153,11 @@ describe('PipelinePreview', function () {
153153

154154
expect(within(docList).getByText(/_id/)).to.exist;
155155
expect(within(docList).getByText(/score/)).to.exist;
156-
expect(() => within(docList).getByText(/number/)).to.throw;
157-
expect(() => within(docList).getByText(/another/)).to.throw;
158-
expect(() => within(docList).getByText(/deep/)).to.throw;
159-
expect(() => within(docList).getByText(/nested/)).to.throw;
160-
expect(() => within(docList).getByText(/document/)).to.throw;
156+
expect(() => within(docList).getByText(/number/)).to.throw();
157+
expect(() => within(docList).getByText(/another/)).to.throw();
158+
expect(() => within(docList).getByText(/deep/)).to.throw();
159+
expect(() => within(docList).getByText(/nested/)).to.throw();
160+
expect(() => within(docList).getByText(/document/)).to.throw();
161161
});
162162

163163
it('renders output stage preview', async function () {

packages/compass-aggregations/src/components/pipeline-builder-workspace/pipeline-as-text-workspace/pipeline-stages-preview.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ describe('OutputStagePreview', function () {
4343
screen.getByRole('button', {
4444
name: /save documents/i,
4545
});
46-
}).to.throw;
46+
}).to.throw();
4747
});
4848
});
4949

packages/compass-aggregations/src/components/pipeline-results-workspace/pipeline-pagination.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ describe('PipelinePagination', function () {
4646
const container = screen.getByTestId('pipeline-pagination');
4747
expect(() => {
4848
within(container).getByTestId('pipeline-pagination-desc');
49-
}).to.throw;
49+
}).to.throw();
5050
});
5151
it('renders paginate buttons as disabled when disabled', async function () {
5252
await renderPipelinePagination({

0 commit comments

Comments
 (0)