From c7034e7c268fc6187ebb4cdad6169ece927567e3 Mon Sep 17 00:00:00 2001 From: Priscila Oliveira Date: Sun, 16 Dec 2018 21:27:20 +0100 Subject: [PATCH] fix: applied valid-expect-in-promise --- .../webui/components/PackageSidebar/packageSidebar.spec.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/unit/webui/components/PackageSidebar/packageSidebar.spec.js b/test/unit/webui/components/PackageSidebar/packageSidebar.spec.js index 32281a884..205be74bc 100644 --- a/test/unit/webui/components/PackageSidebar/packageSidebar.spec.js +++ b/test/unit/webui/components/PackageSidebar/packageSidebar.spec.js @@ -18,7 +18,7 @@ describe(' component', () => { const wrapper = mount(); 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(' component', () => { test('should load the packageMeta', () => { const wrapper = mount(); 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(); }); });