diff --git a/mock-registry/lib/index.js b/mock-registry/lib/index.js index 4318fbc17504a..be1e2f9b30a13 100644 --- a/mock-registry/lib/index.js +++ b/mock-registry/lib/index.js @@ -39,7 +39,6 @@ const auditToBulk = audit => { return bulk } - class MockRegistry { #tap #nock @@ -494,7 +493,7 @@ class MockRegistry { mocks ({ dir }) { const exists = (p) => fs.stat(p).then(() => true).catch(() => false) this.nock = this.nock.get(/.*/).reply(async function (uri) { - const { headers, path: url} = this.req + const { headers, path: url } = this.req const isCorgi = headers.accept.includes('application/vnd.npm.install-v1+json') const f = path.join(dir, 'registry-mocks', 'content', path.join('/', url.replace(/@/g, '').replace(/%2f/gi, '/'))) let file = f @@ -515,9 +514,10 @@ class MockRegistry { body.pause() return [200, body, { 'content-type': contentType }] } - return [404, { error: 'not found' }] + return [404, { error: 'not found' }] }).persist() } + /** * this is a simpler convience method for creating mockable registry with * tarballs for specific versions diff --git a/workspaces/arborist/test/arborist/build-ideal-tree.js b/workspaces/arborist/test/arborist/build-ideal-tree.js index a73eb770ef6f1..855217412e398 100644 --- a/workspaces/arborist/test/arborist/build-ideal-tree.js +++ b/workspaces/arborist/test/arborist/build-ideal-tree.js @@ -185,7 +185,7 @@ t.test('testing-peer-deps package with symlinked root', async t => { createRegistry(t, true) const idealTree = await buildIdeal(path) t.ok(idealTree.isLink, 'ideal tree is rooted on a Link') - const arb = newArb(path, { idealTree}) + const arb = newArb(path, { idealTree }) const tree2 = await arb.buildIdealTree() t.equal(tree2, idealTree) t.matchSnapshot(printTree(idealTree), 'build ideal tree with peer deps')