mirror of
https://github.com/verdaccio/verdaccio.git
synced 2025-03-25 02:32:52 -05:00
fix: applied valid-expect-in-promise
This commit is contained in:
parent
4962e36bbc
commit
c7034e7c26
1 changed files with 3 additions and 3 deletions
|
@ -18,7 +18,7 @@ describe('<PackageSidebar /> component', () => {
|
|||
const wrapper = mount(<PackageSidebar />);
|
||||
const { loadPackageData } = wrapper.instance();
|
||||
expect(console.error).toHaveBeenCalled();
|
||||
loadPackageData().catch(response => {
|
||||
return loadPackageData().catch(response => {
|
||||
expect(response).toBeUndefined();
|
||||
expect(wrapper.state()).toEqual({ failed: true });
|
||||
});
|
||||
|
@ -27,9 +27,9 @@ describe('<PackageSidebar /> component', () => {
|
|||
test('should load the packageMeta', () => {
|
||||
const wrapper = mount(<PackageSidebar packageName={'verdaccio'} />);
|
||||
const { loadPackageData } = wrapper.instance();
|
||||
loadPackageData('verdaccio').then(response => {
|
||||
expect(wrapper.html()).toMatchSnapshot();
|
||||
return loadPackageData('verdaccio').then(response => {
|
||||
expect(wrapper.state('packageMeta')).toEqual(packageMeta);
|
||||
});
|
||||
expect(wrapper.html()).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue