diff options
Diffstat (limited to 'packages/turbo-workspaces/__tests__/test-utils.ts')
| -rw-r--r-- | packages/turbo-workspaces/__tests__/test-utils.ts | 153 |
1 files changed, 0 insertions, 153 deletions
diff --git a/packages/turbo-workspaces/__tests__/test-utils.ts b/packages/turbo-workspaces/__tests__/test-utils.ts deleted file mode 100644 index 4d6c7c9..0000000 --- a/packages/turbo-workspaces/__tests__/test-utils.ts +++ /dev/null @@ -1,153 +0,0 @@ -import { PackageManager } from "../src/types"; - -const PACKAGE_MANAGERS: Array<PackageManager> = ["pnpm", "npm", "yarn"]; -const REPO_TYPES = ["monorepo", "non-monorepo"]; -const BOOLEAN_OPTIONS = [true, false]; - -export function generateConvertMatrix() { - const matrix = []; - for (const fixtureManager of PACKAGE_MANAGERS) { - for (const fixtureType of REPO_TYPES) { - for (const toManager of PACKAGE_MANAGERS) { - for (const interactive of BOOLEAN_OPTIONS) { - for (const dry of BOOLEAN_OPTIONS) { - for (const install of BOOLEAN_OPTIONS) { - matrix.push({ - fixtureManager, - fixtureType, - toManager, - interactive, - dry, - install, - }); - } - } - } - } - } - } - return matrix; -} - -export function generateDetectMatrix() { - const matrix = []; - for (const project of PACKAGE_MANAGERS) { - for (const manager of PACKAGE_MANAGERS) { - for (const type of REPO_TYPES) { - matrix.push({ - project, - manager, - type, - result: project === manager, - }); - } - } - } - return matrix; -} - -export function generateCreateMatrix() { - const matrix = []; - for (const project of PACKAGE_MANAGERS) { - for (const manager of PACKAGE_MANAGERS) { - for (const type of REPO_TYPES) { - for (const interactive of BOOLEAN_OPTIONS) { - for (const dry of BOOLEAN_OPTIONS) { - matrix.push({ - project, - manager, - type, - interactive, - dry, - }); - } - } - } - } - } - return matrix; -} - -export function generateReadMatrix() { - const matrix = []; - for (const fixtureManager of PACKAGE_MANAGERS) { - for (const fixtureType of REPO_TYPES) { - for (const toManager of PACKAGE_MANAGERS) { - matrix.push({ - fixtureManager, - fixtureType, - toManager, - shouldThrow: fixtureManager !== toManager, - }); - } - } - } - - return matrix; -} - -export function generateRemoveMatrix() { - const matrix = []; - for (const fixtureManager of PACKAGE_MANAGERS) { - for (const fixtureType of REPO_TYPES) { - for (const toManager of PACKAGE_MANAGERS) { - for (const withNodeModules of BOOLEAN_OPTIONS) { - for (const interactive of BOOLEAN_OPTIONS) { - for (const dry of BOOLEAN_OPTIONS) { - matrix.push({ - fixtureManager, - fixtureType, - withNodeModules, - toManager, - interactive, - dry, - }); - } - } - } - } - } - } - return matrix; -} - -export function generateCleanMatrix() { - const matrix = []; - for (const fixtureManager of PACKAGE_MANAGERS) { - for (const fixtureType of REPO_TYPES) { - for (const interactive of BOOLEAN_OPTIONS) { - for (const dry of BOOLEAN_OPTIONS) { - matrix.push({ - fixtureManager, - fixtureType, - interactive, - dry, - }); - } - } - } - } - return matrix; -} - -export function generateConvertLockMatrix() { - const matrix = []; - for (const fixtureManager of PACKAGE_MANAGERS) { - for (const fixtureType of REPO_TYPES) { - for (const toManager of PACKAGE_MANAGERS) { - for (const interactive of BOOLEAN_OPTIONS) { - for (const dry of BOOLEAN_OPTIONS) { - matrix.push({ - fixtureManager, - fixtureType, - toManager, - interactive, - dry, - }); - } - } - } - } - } - return matrix; -} |
