diff --git a/packages/modular-scripts/src/__tests__/__fixtures__/ghost-testing/.gitignore b/__fixtures__/ghost-testing/.gitignore similarity index 100% rename from packages/modular-scripts/src/__tests__/__fixtures__/ghost-testing/.gitignore rename to __fixtures__/ghost-testing/.gitignore diff --git a/packages/modular-scripts/src/__tests__/__fixtures__/ghost-testing/.yarnrc b/__fixtures__/ghost-testing/.yarnrc similarity index 100% rename from packages/modular-scripts/src/__tests__/__fixtures__/ghost-testing/.yarnrc rename to __fixtures__/ghost-testing/.yarnrc diff --git a/packages/modular-scripts/src/__tests__/__fixtures__/ghost-testing/README.md b/__fixtures__/ghost-testing/README.md similarity index 100% rename from packages/modular-scripts/src/__tests__/__fixtures__/ghost-testing/README.md rename to __fixtures__/ghost-testing/README.md diff --git a/packages/modular-scripts/src/__tests__/__fixtures__/ghost-testing/modular/setupTests.ts b/__fixtures__/ghost-testing/modular/setupTests.ts similarity index 100% rename from packages/modular-scripts/src/__tests__/__fixtures__/ghost-testing/modular/setupTests.ts rename to __fixtures__/ghost-testing/modular/setupTests.ts diff --git a/packages/modular-scripts/src/__tests__/__fixtures__/ghost-testing/package.json.incognito b/__fixtures__/ghost-testing/package.json similarity index 100% rename from packages/modular-scripts/src/__tests__/__fixtures__/ghost-testing/package.json.incognito rename to __fixtures__/ghost-testing/package.json diff --git a/packages/modular-scripts/src/__tests__/__fixtures__/ghost-testing/packages/README.md b/__fixtures__/ghost-testing/packages/README.md similarity index 100% rename from packages/modular-scripts/src/__tests__/__fixtures__/ghost-testing/packages/README.md rename to __fixtures__/ghost-testing/packages/README.md diff --git a/packages/modular-scripts/src/__tests__/__fixtures__/ghost-testing/packages/a/a-dummy.ts b/__fixtures__/ghost-testing/packages/a/a-dummy.ts similarity index 100% rename from packages/modular-scripts/src/__tests__/__fixtures__/ghost-testing/packages/a/a-dummy.ts rename to __fixtures__/ghost-testing/packages/a/a-dummy.ts diff --git a/packages/modular-scripts/src/__tests__/__fixtures__/ghost-testing/packages/a/package.json.incognito b/__fixtures__/ghost-testing/packages/a/package.json similarity index 100% rename from packages/modular-scripts/src/__tests__/__fixtures__/ghost-testing/packages/a/package.json.incognito rename to __fixtures__/ghost-testing/packages/a/package.json diff --git a/packages/modular-scripts/src/__tests__/__fixtures__/ghost-testing/packages/a/src/__tests__/a.test.ts b/__fixtures__/ghost-testing/packages/a/src/__tests__/a.test.ts similarity index 100% rename from packages/modular-scripts/src/__tests__/__fixtures__/ghost-testing/packages/a/src/__tests__/a.test.ts rename to __fixtures__/ghost-testing/packages/a/src/__tests__/a.test.ts diff --git a/packages/modular-scripts/src/__tests__/__fixtures__/ghost-testing/packages/a/src/__tests__/utils/a-nested.test.ts b/__fixtures__/ghost-testing/packages/a/src/__tests__/utils/a-nested.test.ts similarity index 100% rename from packages/modular-scripts/src/__tests__/__fixtures__/ghost-testing/packages/a/src/__tests__/utils/a-nested.test.ts rename to __fixtures__/ghost-testing/packages/a/src/__tests__/utils/a-nested.test.ts diff --git a/packages/modular-scripts/src/__tests__/__fixtures__/ghost-testing/packages/a/src/index.ts b/__fixtures__/ghost-testing/packages/a/src/index.ts similarity index 100% rename from packages/modular-scripts/src/__tests__/__fixtures__/ghost-testing/packages/a/src/index.ts rename to __fixtures__/ghost-testing/packages/a/src/index.ts diff --git a/packages/modular-scripts/src/__tests__/__fixtures__/ghost-testing/packages/b/package.json.incognito b/__fixtures__/ghost-testing/packages/b/package.json similarity index 100% rename from packages/modular-scripts/src/__tests__/__fixtures__/ghost-testing/packages/b/package.json.incognito rename to __fixtures__/ghost-testing/packages/b/package.json diff --git a/packages/modular-scripts/src/__tests__/__fixtures__/ghost-testing/packages/b/src/__tests__/b-dummy.ts b/__fixtures__/ghost-testing/packages/b/src/__tests__/b-dummy.ts similarity index 100% rename from packages/modular-scripts/src/__tests__/__fixtures__/ghost-testing/packages/b/src/__tests__/b-dummy.ts rename to __fixtures__/ghost-testing/packages/b/src/__tests__/b-dummy.ts diff --git a/packages/modular-scripts/src/__tests__/__fixtures__/ghost-testing/packages/b/src/__tests__/b.test.ts b/__fixtures__/ghost-testing/packages/b/src/__tests__/b.test.ts similarity index 100% rename from packages/modular-scripts/src/__tests__/__fixtures__/ghost-testing/packages/b/src/__tests__/b.test.ts rename to __fixtures__/ghost-testing/packages/b/src/__tests__/b.test.ts diff --git a/packages/modular-scripts/src/__tests__/__fixtures__/ghost-testing/packages/b/src/__tests__/utils/b-nested.test.ts b/__fixtures__/ghost-testing/packages/b/src/__tests__/utils/b-nested.test.ts similarity index 100% rename from packages/modular-scripts/src/__tests__/__fixtures__/ghost-testing/packages/b/src/__tests__/utils/b-nested.test.ts rename to __fixtures__/ghost-testing/packages/b/src/__tests__/utils/b-nested.test.ts diff --git a/packages/modular-scripts/src/__tests__/__fixtures__/ghost-testing/packages/b/src/index.ts b/__fixtures__/ghost-testing/packages/b/src/index.ts similarity index 100% rename from packages/modular-scripts/src/__tests__/__fixtures__/ghost-testing/packages/b/src/index.ts rename to __fixtures__/ghost-testing/packages/b/src/index.ts diff --git a/packages/modular-scripts/src/__tests__/__fixtures__/ghost-testing/packages/c/c-dummy.ts b/__fixtures__/ghost-testing/packages/c/c-dummy.ts similarity index 100% rename from packages/modular-scripts/src/__tests__/__fixtures__/ghost-testing/packages/c/c-dummy.ts rename to __fixtures__/ghost-testing/packages/c/c-dummy.ts diff --git a/packages/modular-scripts/src/__tests__/__fixtures__/ghost-testing/packages/c/package.json.incognito b/__fixtures__/ghost-testing/packages/c/package.json similarity index 100% rename from packages/modular-scripts/src/__tests__/__fixtures__/ghost-testing/packages/c/package.json.incognito rename to __fixtures__/ghost-testing/packages/c/package.json diff --git a/packages/modular-scripts/src/__tests__/__fixtures__/ghost-testing/packages/c/src/__tests__/c.test.ts b/__fixtures__/ghost-testing/packages/c/src/__tests__/c.test.ts similarity index 100% rename from packages/modular-scripts/src/__tests__/__fixtures__/ghost-testing/packages/c/src/__tests__/c.test.ts rename to __fixtures__/ghost-testing/packages/c/src/__tests__/c.test.ts diff --git a/packages/modular-scripts/src/__tests__/__fixtures__/ghost-testing/packages/c/src/__tests__/utils/c-nested.test.ts b/__fixtures__/ghost-testing/packages/c/src/__tests__/utils/c-nested.test.ts similarity index 100% rename from packages/modular-scripts/src/__tests__/__fixtures__/ghost-testing/packages/c/src/__tests__/utils/c-nested.test.ts rename to __fixtures__/ghost-testing/packages/c/src/__tests__/utils/c-nested.test.ts diff --git a/packages/modular-scripts/src/__tests__/__fixtures__/ghost-testing/packages/c/src/index.ts b/__fixtures__/ghost-testing/packages/c/src/index.ts similarity index 100% rename from packages/modular-scripts/src/__tests__/__fixtures__/ghost-testing/packages/c/src/index.ts rename to __fixtures__/ghost-testing/packages/c/src/index.ts diff --git a/packages/modular-scripts/src/__tests__/__fixtures__/ghost-testing/packages/d/package.json.incognito b/__fixtures__/ghost-testing/packages/d/package.json similarity index 100% rename from packages/modular-scripts/src/__tests__/__fixtures__/ghost-testing/packages/d/package.json.incognito rename to __fixtures__/ghost-testing/packages/d/package.json diff --git a/packages/modular-scripts/src/__tests__/__fixtures__/ghost-testing/packages/d/src/__tests__/d-dummy.ts b/__fixtures__/ghost-testing/packages/d/src/__tests__/d-dummy.ts similarity index 100% rename from packages/modular-scripts/src/__tests__/__fixtures__/ghost-testing/packages/d/src/__tests__/d-dummy.ts rename to __fixtures__/ghost-testing/packages/d/src/__tests__/d-dummy.ts diff --git a/packages/modular-scripts/src/__tests__/__fixtures__/ghost-testing/packages/d/src/__tests__/d.test.ts b/__fixtures__/ghost-testing/packages/d/src/__tests__/d.test.ts similarity index 100% rename from packages/modular-scripts/src/__tests__/__fixtures__/ghost-testing/packages/d/src/__tests__/d.test.ts rename to __fixtures__/ghost-testing/packages/d/src/__tests__/d.test.ts diff --git a/packages/modular-scripts/src/__tests__/__fixtures__/ghost-testing/packages/d/src/__tests__/utils/d-nested.test.ts b/__fixtures__/ghost-testing/packages/d/src/__tests__/utils/d-nested.test.ts similarity index 100% rename from packages/modular-scripts/src/__tests__/__fixtures__/ghost-testing/packages/d/src/__tests__/utils/d-nested.test.ts rename to __fixtures__/ghost-testing/packages/d/src/__tests__/utils/d-nested.test.ts diff --git a/packages/modular-scripts/src/__tests__/__fixtures__/ghost-testing/packages/d/src/index.ts b/__fixtures__/ghost-testing/packages/d/src/index.ts similarity index 100% rename from packages/modular-scripts/src/__tests__/__fixtures__/ghost-testing/packages/d/src/index.ts rename to __fixtures__/ghost-testing/packages/d/src/index.ts diff --git a/packages/modular-scripts/src/__tests__/__fixtures__/ghost-testing/packages/e/package.json.incognito b/__fixtures__/ghost-testing/packages/e/package.json similarity index 100% rename from packages/modular-scripts/src/__tests__/__fixtures__/ghost-testing/packages/e/package.json.incognito rename to __fixtures__/ghost-testing/packages/e/package.json diff --git a/packages/modular-scripts/src/__tests__/__fixtures__/ghost-testing/packages/e/src/__tests__/e-dummy.ts b/__fixtures__/ghost-testing/packages/e/src/__tests__/e-dummy.ts similarity index 100% rename from packages/modular-scripts/src/__tests__/__fixtures__/ghost-testing/packages/e/src/__tests__/e-dummy.ts rename to __fixtures__/ghost-testing/packages/e/src/__tests__/e-dummy.ts diff --git a/packages/modular-scripts/src/__tests__/__fixtures__/ghost-testing/packages/e/src/__tests__/e.test.ts b/__fixtures__/ghost-testing/packages/e/src/__tests__/e.test.ts similarity index 100% rename from packages/modular-scripts/src/__tests__/__fixtures__/ghost-testing/packages/e/src/__tests__/e.test.ts rename to __fixtures__/ghost-testing/packages/e/src/__tests__/e.test.ts diff --git a/packages/modular-scripts/src/__tests__/__fixtures__/ghost-testing/packages/e/src/__tests__/utils/e-nested.test.ts b/__fixtures__/ghost-testing/packages/e/src/__tests__/utils/e-nested.test.ts similarity index 100% rename from packages/modular-scripts/src/__tests__/__fixtures__/ghost-testing/packages/e/src/__tests__/utils/e-nested.test.ts rename to __fixtures__/ghost-testing/packages/e/src/__tests__/utils/e-nested.test.ts diff --git a/packages/modular-scripts/src/__tests__/__fixtures__/ghost-testing/packages/e/src/index.ts b/__fixtures__/ghost-testing/packages/e/src/index.ts similarity index 100% rename from packages/modular-scripts/src/__tests__/__fixtures__/ghost-testing/packages/e/src/index.ts rename to __fixtures__/ghost-testing/packages/e/src/index.ts diff --git a/packages/modular-scripts/src/__tests__/__fixtures__/ghost-testing/tsconfig.json b/__fixtures__/ghost-testing/tsconfig.json similarity index 100% rename from packages/modular-scripts/src/__tests__/__fixtures__/ghost-testing/tsconfig.json rename to __fixtures__/ghost-testing/tsconfig.json diff --git a/__fixtures__/clean-workspace-1/package.json b/__fixtures__/resolve-workspace/clean-workspace-1/package.json similarity index 100% rename from __fixtures__/clean-workspace-1/package.json rename to __fixtures__/resolve-workspace/clean-workspace-1/package.json diff --git a/__fixtures__/clean-workspace-1/packages/app-one/package.json b/__fixtures__/resolve-workspace/clean-workspace-1/packages/app-one/package.json similarity index 100% rename from __fixtures__/clean-workspace-1/packages/app-one/package.json rename to __fixtures__/resolve-workspace/clean-workspace-1/packages/app-one/package.json diff --git a/__fixtures__/clean-workspace-1/packages/package-one/package.json b/__fixtures__/resolve-workspace/clean-workspace-1/packages/package-one/package.json similarity index 100% rename from __fixtures__/clean-workspace-1/packages/package-one/package.json rename to __fixtures__/resolve-workspace/clean-workspace-1/packages/package-one/package.json diff --git a/__fixtures__/clean-workspace-1/packages/package-two/package.json b/__fixtures__/resolve-workspace/clean-workspace-1/packages/package-two/package.json similarity index 100% rename from __fixtures__/clean-workspace-1/packages/package-two/package.json rename to __fixtures__/resolve-workspace/clean-workspace-1/packages/package-two/package.json diff --git a/__fixtures__/clean-workspace-2/package.json b/__fixtures__/resolve-workspace/clean-workspace-2/package.json similarity index 100% rename from __fixtures__/clean-workspace-2/package.json rename to __fixtures__/resolve-workspace/clean-workspace-2/package.json diff --git a/__fixtures__/clean-workspace-2/packages/app-one/package.json b/__fixtures__/resolve-workspace/clean-workspace-2/packages/app-one/package.json similarity index 100% rename from __fixtures__/clean-workspace-2/packages/app-one/package.json rename to __fixtures__/resolve-workspace/clean-workspace-2/packages/app-one/package.json diff --git a/__fixtures__/clean-workspace-2/packages/package-one/package.json b/__fixtures__/resolve-workspace/clean-workspace-2/packages/package-one/package.json similarity index 100% rename from __fixtures__/clean-workspace-2/packages/package-one/package.json rename to __fixtures__/resolve-workspace/clean-workspace-2/packages/package-one/package.json diff --git a/__fixtures__/clean-workspace-2/packages/package-two/package.json b/__fixtures__/resolve-workspace/clean-workspace-2/packages/package-two/package.json similarity index 100% rename from __fixtures__/clean-workspace-2/packages/package-two/package.json rename to __fixtures__/resolve-workspace/clean-workspace-2/packages/package-two/package.json diff --git a/__fixtures__/clean-workspace-3/package.json b/__fixtures__/resolve-workspace/clean-workspace-3/package.json similarity index 100% rename from __fixtures__/clean-workspace-3/package.json rename to __fixtures__/resolve-workspace/clean-workspace-3/package.json diff --git a/__fixtures__/clean-workspace-3/packages/app-one/package.json b/__fixtures__/resolve-workspace/clean-workspace-3/packages/app-one/package.json similarity index 100% rename from __fixtures__/clean-workspace-3/packages/app-one/package.json rename to __fixtures__/resolve-workspace/clean-workspace-3/packages/app-one/package.json diff --git a/__fixtures__/clean-workspace-3/packages/package-four/package.json b/__fixtures__/resolve-workspace/clean-workspace-3/packages/package-four/package.json similarity index 100% rename from __fixtures__/clean-workspace-3/packages/package-four/package.json rename to __fixtures__/resolve-workspace/clean-workspace-3/packages/package-four/package.json diff --git a/__fixtures__/clean-workspace-3/packages/package-one/package.json b/__fixtures__/resolve-workspace/clean-workspace-3/packages/package-one/package.json similarity index 100% rename from __fixtures__/clean-workspace-3/packages/package-one/package.json rename to __fixtures__/resolve-workspace/clean-workspace-3/packages/package-one/package.json diff --git a/__fixtures__/clean-workspace-3/packages/package-three/package.json b/__fixtures__/resolve-workspace/clean-workspace-3/packages/package-three/package.json similarity index 100% rename from __fixtures__/clean-workspace-3/packages/package-three/package.json rename to __fixtures__/resolve-workspace/clean-workspace-3/packages/package-three/package.json diff --git a/__fixtures__/clean-workspace-3/packages/package-two/package.json b/__fixtures__/resolve-workspace/clean-workspace-3/packages/package-two/package.json similarity index 100% rename from __fixtures__/clean-workspace-3/packages/package-two/package.json rename to __fixtures__/resolve-workspace/clean-workspace-3/packages/package-two/package.json diff --git a/__fixtures__/invalid-workspace-1/package.json b/__fixtures__/resolve-workspace/invalid-workspace-1/package.json similarity index 100% rename from __fixtures__/invalid-workspace-1/package.json rename to __fixtures__/resolve-workspace/invalid-workspace-1/package.json diff --git a/__fixtures__/invalid-workspace-1/packages/app-one/package.json b/__fixtures__/resolve-workspace/invalid-workspace-1/packages/app-one/package.json similarity index 100% rename from __fixtures__/invalid-workspace-1/packages/app-one/package.json rename to __fixtures__/resolve-workspace/invalid-workspace-1/packages/app-one/package.json diff --git a/__fixtures__/invalid-workspace-1/packages/package-one/package.json b/__fixtures__/resolve-workspace/invalid-workspace-1/packages/package-one/package.json similarity index 100% rename from __fixtures__/invalid-workspace-1/packages/package-one/package.json rename to __fixtures__/resolve-workspace/invalid-workspace-1/packages/package-one/package.json diff --git a/__fixtures__/invalid-workspace-1/packages/package-two/package.json b/__fixtures__/resolve-workspace/invalid-workspace-1/packages/package-two/package.json similarity index 100% rename from __fixtures__/invalid-workspace-1/packages/package-two/package.json rename to __fixtures__/resolve-workspace/invalid-workspace-1/packages/package-two/package.json diff --git a/__fixtures__/invalid-workspace-2/package.json b/__fixtures__/resolve-workspace/invalid-workspace-2/package.json similarity index 100% rename from __fixtures__/invalid-workspace-2/package.json rename to __fixtures__/resolve-workspace/invalid-workspace-2/package.json diff --git a/__fixtures__/invalid-workspace-2/packages/app-one/package.json b/__fixtures__/resolve-workspace/invalid-workspace-2/packages/app-one/package.json similarity index 100% rename from __fixtures__/invalid-workspace-2/packages/app-one/package.json rename to __fixtures__/resolve-workspace/invalid-workspace-2/packages/app-one/package.json diff --git a/__fixtures__/invalid-workspace-2/packages/package-one/package.json b/__fixtures__/resolve-workspace/invalid-workspace-2/packages/package-one/package.json similarity index 100% rename from __fixtures__/invalid-workspace-2/packages/package-one/package.json rename to __fixtures__/resolve-workspace/invalid-workspace-2/packages/package-one/package.json diff --git a/__fixtures__/invalid-workspace-2/packages/package-two/package.json b/__fixtures__/resolve-workspace/invalid-workspace-2/packages/package-two/package.json similarity index 100% rename from __fixtures__/invalid-workspace-2/packages/package-two/package.json rename to __fixtures__/resolve-workspace/invalid-workspace-2/packages/package-two/package.json diff --git a/__fixtures__/invalid-workspace-3/package.json b/__fixtures__/resolve-workspace/invalid-workspace-3/package.json similarity index 100% rename from __fixtures__/invalid-workspace-3/package.json rename to __fixtures__/resolve-workspace/invalid-workspace-3/package.json diff --git a/__fixtures__/invalid-workspace-3/packages/app-one/package.json b/__fixtures__/resolve-workspace/invalid-workspace-3/packages/app-one/package.json similarity index 100% rename from __fixtures__/invalid-workspace-3/packages/app-one/package.json rename to __fixtures__/resolve-workspace/invalid-workspace-3/packages/app-one/package.json diff --git a/__fixtures__/invalid-workspace-3/packages/package-one/package.json b/__fixtures__/resolve-workspace/invalid-workspace-3/packages/package-one/package.json similarity index 100% rename from __fixtures__/invalid-workspace-3/packages/package-one/package.json rename to __fixtures__/resolve-workspace/invalid-workspace-3/packages/package-one/package.json diff --git a/__fixtures__/invalid-workspace-3/packages/package-two/package.json b/__fixtures__/resolve-workspace/invalid-workspace-3/packages/package-two/package.json similarity index 100% rename from __fixtures__/invalid-workspace-3/packages/package-two/package.json rename to __fixtures__/resolve-workspace/invalid-workspace-3/packages/package-two/package.json diff --git a/__fixtures__/invalid-workspace-4/package.json b/__fixtures__/resolve-workspace/invalid-workspace-4/package.json similarity index 100% rename from __fixtures__/invalid-workspace-4/package.json rename to __fixtures__/resolve-workspace/invalid-workspace-4/package.json diff --git a/__fixtures__/invalid-workspace-4/packages/app-one/package.json b/__fixtures__/resolve-workspace/invalid-workspace-4/packages/app-one/package.json similarity index 100% rename from __fixtures__/invalid-workspace-4/packages/app-one/package.json rename to __fixtures__/resolve-workspace/invalid-workspace-4/packages/app-one/package.json diff --git a/__fixtures__/invalid-workspace-4/packages/package-one/package.json b/__fixtures__/resolve-workspace/invalid-workspace-4/packages/package-one/package.json similarity index 100% rename from __fixtures__/invalid-workspace-4/packages/package-one/package.json rename to __fixtures__/resolve-workspace/invalid-workspace-4/packages/package-one/package.json diff --git a/__fixtures__/invalid-workspace-4/packages/package-two/package.json b/__fixtures__/resolve-workspace/invalid-workspace-4/packages/package-two/package.json similarity index 100% rename from __fixtures__/invalid-workspace-4/packages/package-two/package.json rename to __fixtures__/resolve-workspace/invalid-workspace-4/packages/package-two/package.json diff --git a/__fixtures__/invalid-workspace-5/package.json b/__fixtures__/resolve-workspace/invalid-workspace-5/package.json similarity index 100% rename from __fixtures__/invalid-workspace-5/package.json rename to __fixtures__/resolve-workspace/invalid-workspace-5/package.json diff --git a/__fixtures__/invalid-workspace-5/packages/app-one/package.json b/__fixtures__/resolve-workspace/invalid-workspace-5/packages/app-one/package.json similarity index 100% rename from __fixtures__/invalid-workspace-5/packages/app-one/package.json rename to __fixtures__/resolve-workspace/invalid-workspace-5/packages/app-one/package.json diff --git a/__fixtures__/invalid-workspace-5/packages/package-one/package.json b/__fixtures__/resolve-workspace/invalid-workspace-5/packages/package-one/package.json similarity index 100% rename from __fixtures__/invalid-workspace-5/packages/package-one/package.json rename to __fixtures__/resolve-workspace/invalid-workspace-5/packages/package-one/package.json diff --git a/__fixtures__/invalid-workspace-5/packages/package-two/package.json b/__fixtures__/resolve-workspace/invalid-workspace-5/packages/package-two/package.json similarity index 100% rename from __fixtures__/invalid-workspace-5/packages/package-two/package.json rename to __fixtures__/resolve-workspace/invalid-workspace-5/packages/package-two/package.json diff --git a/__fixtures__/mismatched-dependency/package.json b/__fixtures__/resolve-workspace/mismatched-dependency/package.json similarity index 100% rename from __fixtures__/mismatched-dependency/package.json rename to __fixtures__/resolve-workspace/mismatched-dependency/package.json diff --git a/__fixtures__/mismatched-dependency/packages/app-one/package.json b/__fixtures__/resolve-workspace/mismatched-dependency/packages/app-one/package.json similarity index 100% rename from __fixtures__/mismatched-dependency/packages/app-one/package.json rename to __fixtures__/resolve-workspace/mismatched-dependency/packages/app-one/package.json diff --git a/__fixtures__/mismatched-dependency/packages/package-one/package.json b/__fixtures__/resolve-workspace/mismatched-dependency/packages/package-one/package.json similarity index 100% rename from __fixtures__/mismatched-dependency/packages/package-one/package.json rename to __fixtures__/resolve-workspace/mismatched-dependency/packages/package-one/package.json diff --git a/__fixtures__/mismatched-dependency/packages/package-two/package.json b/__fixtures__/resolve-workspace/mismatched-dependency/packages/package-two/package.json similarity index 100% rename from __fixtures__/mismatched-dependency/packages/package-two/package.json rename to __fixtures__/resolve-workspace/mismatched-dependency/packages/package-two/package.json diff --git a/packages/modular-scripts/src/__tests__/test.test.ts b/packages/modular-scripts/src/__tests__/test.test.ts index ed03758c0..778e29186 100644 --- a/packages/modular-scripts/src/__tests__/test.test.ts +++ b/packages/modular-scripts/src/__tests__/test.test.ts @@ -82,34 +82,22 @@ describe('Modular test command', () => { describe('test command can successfully do selective tests based on the state of the repository', () => { const fixturesFolder = path.join( __dirname, + Array.from({ length: 4 }).reduce( + (acc) => `${acc}..${path.sep}`, + '', + ), '__fixtures__', 'ghost-testing', ); + const currentModularFolder = getModularRoot(); let randomOutputFolder: string; - beforeEach(async () => { + beforeEach(() => { // Create random dir randomOutputFolder = tmp.dirSync({ unsafeCleanup: true }).name; fs.copySync(fixturesFolder, randomOutputFolder); - // Get all the files, recursively, and rename the .incognito files - const fileList = await getFileList(randomOutputFolder); - // Generate an array of promises that we can wait parallely on with Promise.all - await Promise.all( - fileList.reduce[]>((acc, filePath) => { - if (path.basename(filePath) === 'package.json.incognito') { - acc.push( - fs.rename( - filePath, - path.join(path.dirname(filePath), 'package.json'), - ), - ); - } - return acc; - }, []), - ); - // Create git repo & commit if (process.env.GIT_AUTHOR_NAME && process.env.GIT_AUTHOR_EMAIL) { execa.sync('git', [ @@ -228,19 +216,3 @@ function runRemoteModularTest( }, ); } - -// Recursively get all files in a directory and its subdirectories -async function getFileList(dirName: string): Promise { - let files: string[] = []; - const items = await fs.readdir(dirName, { withFileTypes: true }); - - for (const item of items) { - if (item.isDirectory()) { - files = [...files, ...(await getFileList(`${dirName}/${item.name}`))]; - } else { - files.push(`${dirName}/${item.name}`); - } - } - - return files; -} diff --git a/packages/workspace-resolver/src/__tests__/resolve-workspace.test.ts b/packages/workspace-resolver/src/__tests__/resolve-workspace.test.ts index 0515c53db..0be12864c 100644 --- a/packages/workspace-resolver/src/__tests__/resolve-workspace.test.ts +++ b/packages/workspace-resolver/src/__tests__/resolve-workspace.test.ts @@ -10,14 +10,19 @@ import path from 'path'; const dirsUp = 4; const traverseUp = Array.from({ length: dirsUp }) .map(() => `..`) - .join(path.sep) - .concat(path.sep); -const fixturesPath = `${__dirname}${path.sep}${traverseUp}__fixtures__${path.sep}`; + .join(path.sep); + +const fixturesPath = path.join( + __dirname, + traverseUp, + '__fixtures__', + 'resolve-workspace', +); describe('@modular-scripts/workspace-resolver', () => { describe('resolveWorkspace', () => { it('resolves a clean workspace, detecting modular packages as appropriate', async () => { - const projectRoot = `${fixturesPath}clean-workspace-1`; + const projectRoot = path.join(fixturesPath, 'clean-workspace-1'); const [allPackages] = await resolveWorkspace(projectRoot, projectRoot); expect(allPackages.has('clean-workspace-1')).toEqual(true); expect(allPackages.has('app-one')).toEqual(true); @@ -28,7 +33,7 @@ describe('@modular-scripts/workspace-resolver', () => { // This covers the alternative object workspaces syntax that yarn supports // See https://classic.yarnpkg.com/blog/2018/02/15/nohoist/ it('resolves a clean workspace (using object workspaces syntax)', async () => { - const projectRoot = `${fixturesPath}clean-workspace-2`; + const projectRoot = path.join(fixturesPath, 'clean-workspace-2'); const [allPackages] = await resolveWorkspace(projectRoot, projectRoot); expect(allPackages.has('clean-workspace-2')).toEqual(true); expect(allPackages.has('app-one')).toEqual(true); @@ -37,7 +42,7 @@ describe('@modular-scripts/workspace-resolver', () => { }); it('resolves a clean workspace (using workspace ranges)', async () => { - const projectRoot = `${fixturesPath}clean-workspace-3`; + const projectRoot = path.join(fixturesPath, 'clean-workspace-3'); const [allPackages] = await resolveWorkspace(projectRoot, projectRoot); expect(allPackages.has('clean-workspace-3')).toEqual(true); expect(allPackages.has('app-one')).toEqual(true); @@ -48,7 +53,7 @@ describe('@modular-scripts/workspace-resolver', () => { }); it('does not support nested modular roots', async () => { - const projectRoot = `${fixturesPath}invalid-workspace-1`; + const projectRoot = path.join(fixturesPath, 'invalid-workspace-1'); let thrown = false; let message = ''; @@ -68,7 +73,7 @@ describe('@modular-scripts/workspace-resolver', () => { }); it('does not support nested yarn workspaces (implementation 1)', async () => { - const projectRoot = `${fixturesPath}invalid-workspace-2`; + const projectRoot = path.join(fixturesPath, 'invalid-workspace-2'); let thrown = false; let message = ''; @@ -88,7 +93,7 @@ describe('@modular-scripts/workspace-resolver', () => { }); it('does not support nested yarn workspaces (implementation 2)', async () => { - const projectRoot = `${fixturesPath}invalid-workspace-3`; + const projectRoot = path.join(fixturesPath, 'invalid-workspace-3'); let thrown = false; let message = ''; @@ -108,7 +113,7 @@ describe('@modular-scripts/workspace-resolver', () => { }); it('does not support packages with no name', async () => { - const projectRoot = `${fixturesPath}invalid-workspace-4`; + const projectRoot = path.join(fixturesPath, 'invalid-workspace-4'); let thrown = false; let message = ''; @@ -128,7 +133,7 @@ describe('@modular-scripts/workspace-resolver', () => { }); it('does not support packages with no version', async () => { - const projectRoot = `${fixturesPath}invalid-workspace-5`; + const projectRoot = path.join(fixturesPath, 'invalid-workspace-5'); let thrown = false; let message = ''; @@ -150,7 +155,7 @@ describe('@modular-scripts/workspace-resolver', () => { describe('analyzeWorkspaceDependencies', () => { it('correctly identifies workspace dependencies for a clean workspace', async () => { - const projectRoot = `${fixturesPath}clean-workspace-1`; + const projectRoot = path.join(fixturesPath, 'clean-workspace-1'); const [allPackages] = await resolveWorkspace(projectRoot, projectRoot); const result = analyzeWorkspaceDependencies(allPackages); @@ -175,7 +180,7 @@ describe('@modular-scripts/workspace-resolver', () => { }); it('correctly identifies mismatched dependencies', async () => { - const projectRoot = `${fixturesPath}mismatched-dependency`; + const projectRoot = path.join(fixturesPath, 'mismatched-dependency'); const [allPackages] = await resolveWorkspace(projectRoot, projectRoot); const result = analyzeWorkspaceDependencies(allPackages); @@ -200,7 +205,7 @@ describe('@modular-scripts/workspace-resolver', () => { }); it('correctly identifies dependencies (workspace range)', async () => { - const projectRoot = `${fixturesPath}clean-workspace-3`; + const projectRoot = path.join(fixturesPath, 'clean-workspace-3'); const [allPackages] = await resolveWorkspace(projectRoot, projectRoot); // Matches explanation (version 1.0.0):