I have this container
import React from "react";
class App extends React.Component {
render() {
return (
<div className="App">
<input type="text" onChange={this.changeInput} />
<button onClick={this.addItem}>Add</button>
</div>
);
}
}
export default App;
Why can't I use shallow
on it? My test looks like so
import App from "./index";
describe("App", function() {
it("should render", function() {
const wrapper = shallow(<App />);
//expect(wrapper).toBe(1);
});
});
The error says Enzyme expects an adapter to be configured, but found none.
but I believed I've setup Enzyme correctly. I want to test whether App contain input and a button, but I'm stuck there..