Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- _handleResults = (results) => {
- if (results.length !== undefined && results.length === 0) {
- this.setState({ noRecord: true })
- }
- if (this.state.val !== '') {
- this.setState({ trainingcatalogues: results })
- } else {
- this.setState({ trainingcatalogues: this.state.traininglist })
- this.setState({ errorMessage: false })
- this.setState({ noRecord: false })
- }
- }
- it('handles the result', () => {
- results="passed";
- const wrapper = renderer.create(<Online />).getInstance();
- wrapper._handleResults(results);
- expect(wrapper.state.noRecord).toBe(true);
- });
- expect(received).toBe(expected)
- Expected value to be (using ===):
- true
- Received:
- false
Add Comment
Please, Sign In to add comment