Skip to content

Commit 3823237

Browse files
committed
chore: run lint --fix
1 parent 3273865 commit 3823237

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

src/__tests__/questionsBoard.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ test('form submits two answers', () => {
5555
fireEvent.changeText(answerInputs[1], 'a2');
5656
fireEvent.press(getByText('Submit'));
5757

58-
expect(mockFn).toBeCalledWith({
58+
expect(mockFn).toHaveBeenCalledWith({
5959
'1': { q: 'q1', a: 'a1' },
6060
'2': { q: 'q2', a: 'a2' },
6161
});

src/__tests__/screen.test.tsx

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,12 @@ test('screen works with nested re-mounting rerender', () => {
5252
});
5353

5454
test('screen throws without render', () => {
55-
expect(() => screen.container).toThrowError(
55+
expect(() => screen.container).toThrow('`render` method has not been called');
56+
expect(() => screen.debug()).toThrow('`render` method has not been called');
57+
expect(() => screen.debug.shallow()).toThrow(
5658
'`render` method has not been called'
5759
);
58-
expect(() => screen.debug()).toThrowError(
59-
'`render` method has not been called'
60-
);
61-
expect(() => screen.debug.shallow()).toThrowError(
62-
'`render` method has not been called'
63-
);
64-
expect(() => screen.getByText('Mt. Everest')).toThrowError(
60+
expect(() => screen.getByText('Mt. Everest')).toThrow(
6561
'`render` method has not been called'
6662
);
6763
});

src/queries/__tests__/testId.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ test('getByTestId returns only native elements', () => {
4949
expect(getAllByTestId('view')).toHaveLength(1);
5050
expect(getAllByTestId('button')).toHaveLength(1);
5151

52-
expect(() => getByTestId('myComponent')).toThrowError(
52+
expect(() => getByTestId('myComponent')).toThrow(
5353
'Unable to find an element with testID: myComponent'
5454
);
55-
expect(() => getAllByTestId('myComponent')).toThrowError(
55+
expect(() => getAllByTestId('myComponent')).toThrow(
5656
'Unable to find an element with testID: myComponent'
5757
);
5858
});

0 commit comments

Comments
 (0)