-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/mini challenge 4 #84
base: master
Are you sure you want to change the base?
Feat/mini challenge 4 #84
Conversation
it('should to take snapshop', () => { | ||
expect(wrapper).toMatchSnapshot(); | ||
}); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is on this test the App component fetching the real YouTube Api? seems like that. Remember to avoid real YouTube api calls on tests.
const history = useHistory(); | ||
const { search, setSearch, darkMode, setDarkMode } = useContext(AppContext); | ||
const [anchorEl, setAnchorEl] = useState(null); | ||
// const [darkMode, setDarkMode] = useState(false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
always remove commented code
const darkMode = screen.getByText(/Dark Mode/i); | ||
expect(darkMode).toBeInTheDocument(); | ||
}); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good test :)
const thumbnail = screen.getByRole('img'); | ||
expect(thumbnail).toHaveAttribute('src', props.imageURL); | ||
}); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good test :D
test('Render RelatedVideo component', () => { | ||
expect(wrapper).not.toBeNull(); | ||
}); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could add more expects like a related video values
const descriptionElement = screen.getByText(correctProps.description); | ||
expect(descriptionElement).toBeInTheDocument(); | ||
}); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good test
test('Render Home Page', () => { | ||
expect(wrapper).not.toBeNull(); | ||
}); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is on this test fetching the real YouTube api?
test('Render Video Template Page', () => { | ||
expect(wrapper).not.toBeNull(); | ||
}); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is on this test fetching the real YouTube api?
Acceptance Criteria
Bonus Points
Seems like is not present the |
No description provided.