0
我有這樣的代碼:在這個例子中如何測試react.js中的模擬上下文?
render() {
...
const {
exampleMethod,
} = this.props;
const { getPath } = this.context;
const exampletData = exampleMethod(getPath());
...
}
我如何可以模擬,測試情境?一般來說,你如何測試上下文?