enzymejs / enzymejs/enzyme

shallow的使用

Open
#2,177 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
19.8k
Forks
2k
PR merge metrics
No merged PRs in 30d

Description

```jsx
import { shallow } from 'enzyme'
let wrapper
beforeEach(() => {
wrapper = shallow()
})
```

PriceList是一个函数式组件
为什么wrapper的值是{}

Contributor guide

Open the contributing guide

Research direction

Start with the shallow call and the PriceList component named in the issue, then inspect Enzyme's documented wrapper behavior and the component's props. Done means explaining why the observed value is {}, or documenting a reproducible behavior change with a focused test; no file or test path is provided.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend, testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.