From 9eb3c75101c1892f2e48d449ba133d49ceca86fb Mon Sep 17 00:00:00 2001
From: Rhys Arkins <rhys@arkins.net>
Date: Wed, 28 Aug 2019 15:08:06 +0200
Subject: [PATCH] =?UTF-8?q?test:=20don=E2=80=99t=20test=20npm=20cache?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Too unreliable when tests are executed in parallel
---
 lib/datasource/npm/get.ts         |  1 +
 test/datasource/npm/index.spec.ts | 13 -------------
 2 files changed, 1 insertion(+), 13 deletions(-)

diff --git a/lib/datasource/npm/get.ts b/lib/datasource/npm/get.ts
index aa7304d1f9..baf57dfe7e 100644
--- a/lib/datasource/npm/get.ts
+++ b/lib/datasource/npm/get.ts
@@ -69,6 +69,7 @@ export async function getDependency(
     cacheNamespace,
     pkgUrl
   );
+  // istanbul ignore if
   if (cachedResult) {
     return cachedResult;
   }
diff --git a/test/datasource/npm/index.spec.ts b/test/datasource/npm/index.spec.ts
index 47c0f7a7c8..0870033db2 100644
--- a/test/datasource/npm/index.spec.ts
+++ b/test/datasource/npm/index.spec.ts
@@ -368,19 +368,6 @@ describe('api/npm', () => {
     expect(res1).not.toBeNull();
     expect(res1).toEqual(res2);
   });
-  it('should use global cache', async () => {
-    const dep = {
-      name: 'abc123',
-    };
-    await global.renovateCache.set(
-      'datasource-npm',
-      'https://registry.npmjs.org/abc123',
-      dep,
-      10
-    );
-    const res = await npm.getPkgReleases({ lookupName: 'abc123' });
-    expect(res).toEqual(dep);
-  });
   it('should fetch package info from custom registry', async () => {
     nock('https://npm.mycustomregistry.com')
       .get('/foobar')
-- 
GitLab