Skip to content

Commit

Permalink
chore: try something
Browse files Browse the repository at this point in the history
  • Loading branch information
jmfrancois committed Oct 24, 2023
1 parent 4751981 commit 42fe6a4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/a11y/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"types": "./lib/index.d.ts",
"scripts": {
"build:lib": "talend-scripts build",
"test": "talend-scripts test ./src",
"test": "talend-scripts test",
"lint": "talend-scripts lint"
},
"keywords": [
Expand All @@ -30,6 +30,7 @@
},
"devDependencies": {
"@talend/scripts-core": "^16.0.0",
"@testing-library/user-event": "^14.5.1",
"@testing-library/react": "^14.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
Expand Down
7 changes: 6 additions & 1 deletion packages/a11y/src/Gesture/withCalendarGesture.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import userEventLib from '@testing-library/user-event';
import { withCalendarGesture } from './withCalendarGesture';
import DayCalendar from '../__mocks__/day-calendar';
import { CalendarGestureProps } from './propTypes';
Expand Down Expand Up @@ -71,14 +71,19 @@ describe('withCalendarGesture', () => {
goToPreviousMonth: jest.fn(),
goToNextMonth: jest.fn(),
};
let userEvent: any;

Check warning on line 74 in packages/a11y/src/Gesture/withCalendarGesture.test.tsx

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

packages/a11y/src/Gesture/withCalendarGesture.test.tsx#L74

[@typescript-eslint/no-explicit-any] Unexpected any. Specify a different type.

beforeEach(() => {
userEvent = userEventLib.setup();
jest.clearAllMocks();
});

describe('LEFT keydown', () => {
it('should focus on previous day in same week', async () => {
// given
render(<DayCalendarWithGesture {...props} />);
// when

await userEvent.click(screen.getByTestId('12'));
expect(screen.getByTestId('12')).toHaveFocus();

Expand Down

0 comments on commit 42fe6a4

Please sign in to comment.