diff options
| author | 2023-11-03 21:25:40 +0800 | |
|---|---|---|
| committer | 2023-11-03 21:25:40 +0800 | |
| commit | 9029588590bea8b10451575c5142dcde77ecd1b5 (patch) | |
| tree | 04cf8aee56c23fd225ff19d340f7cee621d874ef /packages/turbo-utils/__tests__/getTurboConfigs.test.ts | |
| parent | 94071d7ce16c56641d67d488e2bac6be84ffe731 (diff) | |
| download | HydroRoll-9029588590bea8b10451575c5142dcde77ecd1b5.tar.gz HydroRoll-9029588590bea8b10451575c5142dcde77ecd1b5.zip | |
chore: delete useless files
Diffstat (limited to 'packages/turbo-utils/__tests__/getTurboConfigs.test.ts')
| -rw-r--r-- | packages/turbo-utils/__tests__/getTurboConfigs.test.ts | 112 |
1 files changed, 0 insertions, 112 deletions
diff --git a/packages/turbo-utils/__tests__/getTurboConfigs.test.ts b/packages/turbo-utils/__tests__/getTurboConfigs.test.ts deleted file mode 100644 index e61e630..0000000 --- a/packages/turbo-utils/__tests__/getTurboConfigs.test.ts +++ /dev/null @@ -1,112 +0,0 @@ -import path from "path"; -import getTurboConfigs from "../src/getTurboConfigs"; -import { setupTestFixtures } from "@turbo/test-utils"; - -describe("getTurboConfigs", () => { - const { useFixture } = setupTestFixtures({ - directory: path.join(__dirname, "../"), - test: "common", - }); - - it("single-package", async () => { - const { root } = useFixture({ fixture: `single-package` }); - const configs = getTurboConfigs(root); - expect(configs).toHaveLength(1); - expect(configs[0].isRootConfig).toBe(true); - expect(configs[0].config).toMatchInlineSnapshot(` - Object { - "$schema": "https://turbo.build/schema.json", - "globalEnv": Array [ - "UNORDERED", - "CI", - ], - "pipeline": Object { - "build": Object { - "dependsOn": Array [ - "^build", - ], - }, - "deploy": Object { - "dependsOn": Array [ - "build", - "test", - "lint", - ], - "outputs": Array [], - }, - "lint": Object { - "outputs": Array [], - }, - "test": Object { - "dependsOn": Array [ - "build", - ], - "inputs": Array [ - "src/**/*.tsx", - "src/**/*.ts", - "test/**/*.ts", - "test/**/*.tsx", - ], - "outputs": Array [], - }, - }, - } - `); - }); - - it("workspace-configs", async () => { - const { root } = useFixture({ fixture: `workspace-configs` }); - const configs = getTurboConfigs(root); - - expect(configs).toHaveLength(3); - expect(configs[0].isRootConfig).toBe(true); - expect(configs[0].config).toMatchInlineSnapshot(` - Object { - "$schema": "https://turbo.build/schema.json", - "globalEnv": Array [ - "CI", - ], - "pipeline": Object { - "build": Object { - "env": Array [ - "ENV_1", - ], - }, - }, - } - `); - expect(configs[1].isRootConfig).toBe(false); - expect(configs[1].config).toMatchInlineSnapshot(` - Object { - "$schema": "https://turbo.build/schema.json", - "extends": Array [ - "//", - ], - "pipeline": Object { - "build": Object { - "env": Array [ - "ENV_2", - ], - }, - }, - } - `); - - expect(configs[2].isRootConfig).toBe(false); - expect(configs[2].config).toMatchInlineSnapshot(` - Object { - "$schema": "https://turbo.build/schema.json", - "extends": Array [ - "//", - ], - "pipeline": Object { - "build": Object { - "env": Array [ - "IS_SERVER", - ], - }, - }, - } - `); - }); -}); |
