Browse Source

chore(deps-dev): bump eslint-plugin-jest from 24.7.0 to 25.0.1 (#32444)

* chore(deps-dev): bump eslint-plugin-jest from 24.7.0 to 25.0.1

Bumps [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) from 24.7.0 to 25.0.1.
- [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases)
- [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jest-community/eslint-plugin-jest/compare/v24.7.0...v25.0.1)

---
updated-dependencies:
- dependency-name: eslint-plugin-jest
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore: fix eslint errors and warnings

* fix rc-slider version

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
pull/32448/head
afc163 3 years ago
committed by GitHub
parent
commit
6d3973fb95
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      components/alert/__tests__/index.test.tsx
  2. 17
      components/cascader/__tests__/index.test.js
  3. 1
      components/config-provider/__tests__/components.test.js
  4. 4
      package.json
  5. 1
      scripts/css-variable-sync.js
  6. 1
      tests/shared/excludeWarning.tsx
  7. 1
      webpack.config.js

1
components/alert/__tests__/index.test.tsx

@ -77,6 +77,7 @@ describe('Alert', () => {
it('ErrorBoundary', () => {
jest.spyOn(console, 'error').mockImplementation(() => undefined);
// eslint-disable-next-line no-console
expect(console.error).toBeCalledTimes(0);
// @ts-expect-error
// eslint-disable-next-line react/jsx-no-undef

17
components/cascader/__tests__/index.test.js

@ -327,14 +327,15 @@ describe('Cascader', () => {
});
// FIXME: Move to `rc-tree-select` instead
// it('should warning if not find `value` in `options`', () => {
// const errorSpy = jest.spyOn(console, 'error').mockImplementation(() => {});
// mount(<Cascader options={[{ label: 'a', value: 'a', children: [{ label: 'b' }] }]} />);
// expect(errorSpy).toHaveBeenCalledWith(
// 'Warning: [antd: Cascader] Not found `value` in `options`.',
// );
// errorSpy.mockRestore();
// });
// eslint-disable-next-line jest/no-disabled-tests
it.skip('should warning if not find `value` in `options`', () => {
const errorSpy = jest.spyOn(console, 'error').mockImplementation(() => {});
mount(<Cascader options={[{ label: 'a', value: 'a', children: [{ label: 'b' }] }]} />);
expect(errorSpy).toHaveBeenCalledWith(
'Warning: [antd: Cascader] Not found `value` in `options`.',
);
errorSpy.mockRestore();
});
// https://github.com/ant-design/ant-design/issues/17690
it('should not breaks when children is null', () => {

1
components/config-provider/__tests__/components.test.js

@ -60,7 +60,6 @@ jest.mock('rc-util/lib/Portal');
describe('ConfigProvider', () => {
describe('components', () => {
function testPair(name, renderComponent) {
// eslint-disable-next-line jest/valid-describe
describe(`${name}`, () => {
// normal
it('normal', () => {

4
package.json

@ -137,7 +137,7 @@
"rc-rate": "~2.9.0",
"rc-resize-observer": "^1.0.0",
"rc-select": "~13.1.0-alpha.0",
"rc-slider": "~9.7.1",
"rc-slider": "~9.7.4",
"rc-steps": "~4.1.0",
"rc-switch": "~3.2.0",
"rc-table": "~7.18.0",
@ -204,7 +204,7 @@
"eslint-plugin-babel": "^5.3.0",
"eslint-plugin-compat": "^3.9.0",
"eslint-plugin-import": "^2.21.1",
"eslint-plugin-jest": "^24.0.1",
"eslint-plugin-jest": "^25.0.1",
"eslint-plugin-jsx-a11y": "^6.2.1",
"eslint-plugin-markdown": "^2.0.0",
"eslint-plugin-react": "^7.20.6",

1
scripts/css-variable-sync.js

@ -218,4 +218,5 @@ replaceVariable('alert-error-bg-color', '@error-color-deprecated-bg');
fse.writeFileSync(targetPath, variableContent, 'utf8');
// eslint-disable-next-line no-console
console.log(chalk.green('Success! Replaced path:'), targetPath);

1
tests/shared/excludeWarning.tsx

@ -1,3 +1,4 @@
// eslint-disable-next-line no-console
const originError = console.error;
/** This function will remove `useLayoutEffect` server side warning. Since it's useless. */

1
webpack.config.js

@ -92,6 +92,7 @@ function processWebpackThemeConfig(themeConfig, theme, vars) {
if (originPath.length === 1 && originPath[0] === './index') {
replacedPath = ['./index-style-only'];
} else {
// eslint-disable-next-line no-console
console.log(chalk.red('🆘 Seems entry has changed! It should be `./index`'));
}

Loading…
Cancel
Save