react-component / react-component/picker

Jest issue TypeError: generateConfig[fn] is not a function

Open
#755 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
304
Forks
345
Avg merge
2d 7h
Merged PRs (30d)
7

Description

detail: TypeError: generateConfig[fn] is not a function
          at /home/frontend/node_modules/antd/node_modules/rc-picker/lib/utils/dateUtil.js:157:35
          at Array.forEach (<anonymous>)
          at forEach (/home/frontend/node_modules/antd/node_modules/rc-picker/lib/utils/dateUtil.js:153:9)
          at /home/frontend/node_modules/antd/node_modules/rc-picker/lib/PickerInput/hooks/useRangePickerValue.js:84:59
          at nextCreate (/home/frontend/node_modules/react-dom/cjs/react-dom.development.js:15846:19)
          at Object.mountMemo [as useMemo] (/home/frontend/node_modules/react-dom/cjs/react-dom.development.js:16219:16)
          at Object.useMemo (/home/frontend/node_modules/react/cjs/react.development.js:1532:21)
          at useMemo (/home/frontend/node_modules/antd/node_modules/rc-picker/lib/PickerInput/hooks/useRangePickerValue.js:80:34)
          at Picker (/home/frontend/node_modules/antd/node_modules/rc-picker/lib/PickerInput/SinglePicker.js:200:63)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Jest TypeError and trace execution through antd/node_modules/rc-picker/lib/utils/dateUtil.js and PickerInput/hooks/useRangePickerValue.js. The issue provides no reproduction or test location, so first identify the triggering configuration, then add a regression test and verify the error no longer occurs.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.