Skip to content

Commit 719c8d7

Browse files
committed
Fix linter errors
1 parent 8c9b314 commit 719c8d7

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

.eslintrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"plugin:jest-dom/recommended",
3434
"plugin:eslint-comments/recommended",
3535
"plugin:@typescript-eslint/recommended",
36-
"plugin:prettier/recommended",
36+
"plugin:prettier/recommended"
3737
],
3838
"rules": {
3939
"require-jsdoc": [

__tests__/SignaturePad.test.tsx

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ describe('Component', () => {
3535
it('renders the component', () => {
3636
const { queryByTestId } = render(<SignaturePad redrawOnResize />);
3737

38-
expect(queryByTestId('canvas-element')).toBeTruthy();
38+
expect(queryByTestId('canvas-element')).toBeInTheDocument();
3939
});
4040

4141
it('loads a signature', () => {
@@ -142,7 +142,7 @@ describe('Component', () => {
142142
const instance = React.createRef<SignaturePad>();
143143

144144
render(<SignaturePad ref={instance} redrawOnResize />);
145-
145+
146146
const spy = jest.spyOn(instance.current!.instance, 'off');
147147

148148
instance.current!.off();
@@ -214,17 +214,22 @@ describe('Component', () => {
214214

215215
render(<SignaturePad ref={instance} redrawOnResize width={512} height={512} />);
216216

217-
expect(spy).not.toHaveBeenCalledWith('resize', Reflect.get(instance.current as SignaturePad, 'callResizeHandler'));
217+
expect(spy).not.toHaveBeenCalledWith(
218+
'resize',
219+
Reflect.get(instance.current as SignaturePad, 'callResizeHandler'),
220+
);
218221
});
219222

220223
it('adds the resize event listener on mount', () => {
221224
const spy = jest.spyOn(window, 'addEventListener');
222225
const instance = React.createRef<SignaturePad>();
223226

224227
render(<SignaturePad ref={instance} />);
225-
226228

227-
expect(spy).toHaveBeenCalledWith('resize', Reflect.get(instance.current as SignaturePad, 'callResizeHandler'));
229+
expect(spy).toHaveBeenCalledWith(
230+
'resize',
231+
Reflect.get(instance.current as SignaturePad, 'callResizeHandler'),
232+
);
228233
});
229234

230235
it('removes the resize event listener on unmount', () => {

0 commit comments

Comments
 (0)