Skip to content

Commit

Permalink
Bump eslint-plugin-mocha to ^10.3.0 (mui#12112)
Browse files Browse the repository at this point in the history
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Lukas <[email protected]>
  • Loading branch information
2 people authored and thomasmoon committed Sep 6, 2024
1 parent fbcd250 commit 784e1b9
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsdoc": "^48.2.0",
"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 @@ -504,15 +504,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 @@ -521,6 +525,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 @@ -138,10 +138,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 @@ -178,6 +178,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 @@ -196,6 +197,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 @@ -212,6 +214,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
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6834,10 +6834,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

0 comments on commit 784e1b9

Please sign in to comment.