diff --git a/__tests__/commands/add.js b/__tests__/commands/add.js index 3cb7e72bf1..d27f9544eb 100644 --- a/__tests__/commands/add.js +++ b/__tests__/commands/add.js @@ -1075,9 +1075,7 @@ test.concurrent('installing with --pure-lockfile and then adding should keep bui }); test.concurrent('preserves unaffected bin links after adding to workspace package', async () => { - await runInstall({binLinks: true}, 'workspaces-install-bin', async (config): Promise => { - const reporter = new ConsoleReporter({}); - + await runInstall({binLinks: true}, 'workspaces-install-bin', async (config, reporter): Promise => { expect(await fs.exists(`${config.cwd}/node_modules/.bin/rimraf`)).toEqual(true); expect(await fs.exists(`${config.cwd}/node_modules/.bin/touch`)).toEqual(true); expect(await fs.exists(`${config.cwd}/node_modules/.bin/workspace-1`)).toEqual(true); @@ -1142,10 +1140,8 @@ test.concurrent('installs "latest" instead of maxSatisfying if no requested patt }); describe('nohoist', () => { - test.concurrent('can add nohoist pacakge from workspace', async () => { - await runInstall({}, 'workspaces-install-nohoist-across-versions', async (config): Promise => { - const reporter = new ConsoleReporter({}); - + test.concurrent('can add nohoist package from workspace', async () => { + await runInstall({}, 'workspaces-install-nohoist-across-versions', async (config, reporter): Promise => { // workspace-2 has b and c since the root has nohoist = ['a', 'b', 'c'] expect(await fs.exists(`${config.cwd}/packages/workspace-2/node_modules/b`)).toEqual(true); expect(await fs.exists(`${config.cwd}/packages/workspace-2/node_modules/c`)).toEqual(true); @@ -1171,10 +1167,8 @@ describe('nohoist', () => { expect(await fs.exists(`${config.cwd}/node_modules/c`)).toEqual(false); }); }); - test.concurrent('can add nohoist pacakge from root', async () => { - await runInstall({}, 'workspaces-install-nohoist-across-versions', async (config): Promise => { - const reporter = new ConsoleReporter({}); - + test.concurrent('can add nohoist package from root', async () => { + await runInstall({}, 'workspaces-install-nohoist-across-versions', async (config, reporter): Promise => { // prove package a does not exist in workspace-2 nor in root expect(await fs.exists(`${config.cwd}/packages/workspace-2/node_modules/a`)).toEqual(false); expect(await fs.exists(`${config.cwd}/node_modules/a`)).toEqual(false); diff --git a/__tests__/commands/remove.js b/__tests__/commands/remove.js index 40ef91ee2d..adf23538b8 100644 --- a/__tests__/commands/remove.js +++ b/__tests__/commands/remove.js @@ -147,9 +147,7 @@ test.concurrent('removes package installed without a manifest', (): Promise { - await runInstall({}, 'workspaces-install-basic', async (config): Promise => { - const reporter = new ConsoleReporter({}); - + await runInstall({}, 'workspaces-install-basic', async (config, reporter): Promise => { expect(await fs.exists(`${config.cwd}/node_modules/isarray`)).toEqual(true); expect(await fs.exists(`${config.cwd}/workspace-child/node_modules/isarray`)).toEqual(false); @@ -173,9 +171,7 @@ test.concurrent('removes from workspace packages', async () => { }); test.concurrent('preserves unaffected bin links after removing workspace packages', async () => { - await runInstall({binLinks: true}, 'workspaces-install-bin', async (config): Promise => { - const reporter = new ConsoleReporter({}); - + await runInstall({binLinks: true}, 'workspaces-install-bin', async (config, reporter): Promise => { expect(await fs.exists(`${config.cwd}/node_modules/.bin/rimraf`)).toEqual(true); expect(await fs.exists(`${config.cwd}/node_modules/.bin/touch`)).toEqual(true); expect(await fs.exists(`${config.cwd}/node_modules/.bin/workspace-1`)).toEqual(true);