Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump eslint-plugin-mocha to ^10.3.0 #12112

Merged
merged 2 commits into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsdoc": "^48.0.6",
"eslint-plugin-jsx-a11y": "^6.8.0",
"eslint-plugin-mocha": "^10.2.0",
"eslint-plugin-mocha": "^10.3.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -481,15 +481,19 @@ describe('<DataGridPro /> - Columns', () => {
it('.columns works', async () => {
await autosize({ columns: [columns[0].field] }, [50, 100]);
});

it('.includeHeaders works', async () => {
await autosize({ includeHeaders: true }, [213, 235]);
});

it('.includeOutliers works', async () => {
await autosize({ includeOutliers: true }, [50, 144]);
});

it('.outliersFactor works', async () => {
await autosize({ outliersFactor: 40 }, [50, 144]);
});

it('.expand works', async () => {
await autosize({ expand: true }, [134, 148]);
});
Expand All @@ -498,6 +502,7 @@ describe('<DataGridPro /> - Columns', () => {

describe('column pipe processing', () => {
type GridPrivateApiContextRef = ReturnType<typeof useGridPrivateApiContext>;

it('should not loose column width when re-applying pipe processing', () => {
let privateApi: GridPrivateApiContextRef;
function Footer() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,7 @@ describe('<DataGridPro /> - Tree data', () => {
/>
);
}

it('should respect the pageSize for the top level rows when toggling children expansion', () => {
render(<PaginatedTest initialModel={{ pageSize: 2, page: 0 }} />);
expect(getColumnValues(1)).to.deep.equal(['A', 'B']);
Expand Down
1 change: 1 addition & 0 deletions packages/x-data-grid/src/tests/export.DataGrid.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ describe('<DataGrid /> - Export', () => {
});

let spyCreateObjectURL: SinonSpy;

beforeEach(() => {
spyCreateObjectURL = spy(global.URL, 'createObjectURL');
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,12 @@ describe('<DesktopDatePicker />', () => {

let originalScrollX: number;
let originalScrollY: number;

beforeEach(() => {
originalScrollX = window.screenX;
originalScrollY = window.scrollY;
});

afterEach(() => {
window.scrollTo(originalScrollX, originalScrollY);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ describe('<StaticDatePicker /> - Keyboard interactions', () => {
});
});
});

describe('MonthCalendar keyboard navigation', () => {
[
{ key: 'ArrowLeft', expectFocusedMonth: 'Jul' },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ describe('useLicenseVerifier', function test() {
const { render } = createRenderer();

let env: any;

beforeEach(() => {
env = process.env.NODE_ENV;
// Avoid Karma "Invalid left-hand side in assignment" SyntaxError
Expand Down
1 change: 1 addition & 0 deletions packages/x-license/src/verifyLicense/verifyLicense.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const RELEASE_INFO = generateReleaseInfo(releaseDate);

describe('License: verifyLicense', () => {
let env: any;

beforeEach(() => {
env = process.env.NODE_ENV;
process.env.NODE_ENV = 'test';
Expand Down
3 changes: 3 additions & 0 deletions packages/x-tree-view/src/TreeItem/TreeItem.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ describe('<TreeItem />', () => {

expect(getByTestId('2')).not.to.have.attribute('aria-expanded');
});

it('should treat multiple empty conditional arrays as empty', () => {
const { getByTestId } = render(
<SimpleTreeView defaultExpandedNodes={['1']}>
Expand All @@ -202,6 +203,7 @@ describe('<TreeItem />', () => {

expect(getByTestId('2')).not.to.have.attribute('aria-expanded');
});

it('should treat one conditional empty and one conditional with results as expandable', () => {
const { getByTestId } = render(
<SimpleTreeView defaultExpandedNodes={['1', '2']}>
Expand All @@ -218,6 +220,7 @@ describe('<TreeItem />', () => {

expect(getByTestId('2')).to.have.attribute('aria-expanded', 'true');
});

it('should handle edge case of nested array of array', () => {
const { getByTestId } = render(
<SimpleTreeView defaultExpandedNodes={['1', '2']}>
Expand Down
3 changes: 3 additions & 0 deletions test/e2e/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,7 @@ async function initializeEnvironment(
expect(await input.inputValue()).to.equal('02/11/2022');
});
});

describe('<MobileDatePicker />', () => {
it('should allow selecting a value', async () => {
await renderFixture('DatePicker/BasicMobileDatePicker');
Expand All @@ -606,6 +607,7 @@ async function initializeEnvironment(
});
});
});

describe('<DesktopDateTimePicker />', () => {
it('should allow selecting a value', async () => {
await renderFixture('DatePicker/BasicDesktopDateTimePicker');
Expand Down Expand Up @@ -695,6 +697,7 @@ async function initializeEnvironment(
});
});
});

describe('<DateRangePicker />', () => {
it('should allow selecting a range value', async () => {
// firefox in CI is not happy with this test
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6840,10 +6840,10 @@ eslint-plugin-jsx-a11y@^6.8.0:
object.entries "^1.1.7"
object.fromentries "^2.0.7"

eslint-plugin-mocha@^10.2.0:
version "10.2.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-mocha/-/eslint-plugin-mocha-10.2.0.tgz#15b05ce5be4b332bb0d76826ec1c5ebf67102ad6"
integrity sha512-ZhdxzSZnd1P9LqDPF0DBcFLpRIGdh1zkF2JHnQklKQOvrQtT73kdP5K9V2mzvbLR+cCAO9OI48NXK/Ax9/ciCQ==
eslint-plugin-mocha@^10.3.0:
version "10.3.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-mocha/-/eslint-plugin-mocha-10.3.0.tgz#a1cd40737c230f4dc7477a3bef3bbaad7f8d8282"
integrity sha512-IWzbg2K6B1Q7h37Ih4zMyW+nhmw1JvUlHlbCUUUu6PfOOAUGCB0gxmvv7/U+TQQ6e8yHUv+q7KMdIIum4bx+PA==
dependencies:
eslint-utils "^3.0.0"
rambda "^7.4.0"
Expand Down
Loading