diff options
| author | 2023-11-03 21:25:40 +0800 | |
|---|---|---|
| committer | 2023-11-03 21:25:40 +0800 | |
| commit | 9029588590bea8b10451575c5142dcde77ecd1b5 (patch) | |
| tree | 04cf8aee56c23fd225ff19d340f7cee621d874ef /packages/create-turbo/__tests__/isFolderEmpty.test.ts | |
| parent | 94071d7ce16c56641d67d488e2bac6be84ffe731 (diff) | |
| download | HydroRoll-9029588590bea8b10451575c5142dcde77ecd1b5.tar.gz HydroRoll-9029588590bea8b10451575c5142dcde77ecd1b5.zip | |
chore: delete useless files
Diffstat (limited to 'packages/create-turbo/__tests__/isFolderEmpty.test.ts')
| -rw-r--r-- | packages/create-turbo/__tests__/isFolderEmpty.test.ts | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/packages/create-turbo/__tests__/isFolderEmpty.test.ts b/packages/create-turbo/__tests__/isFolderEmpty.test.ts deleted file mode 100644 index 66b2310..0000000 --- a/packages/create-turbo/__tests__/isFolderEmpty.test.ts +++ /dev/null @@ -1,41 +0,0 @@ -import fs from "fs-extra"; -import path from "path"; -import { isFolderEmpty } from "../src/utils/isFolderEmpty"; -import { setupTestFixtures } from "@turbo/test-utils"; - -describe("isFolderEmpty", () => { - const { useFixture } = setupTestFixtures({ - directory: path.join(__dirname, "../"), - }); - - it("correctly identifies an empty directory", async () => { - const { root } = useFixture({ fixture: `is-folder-empty` }); - const result = isFolderEmpty(root); - expect(result.isEmpty).toEqual(true); - expect(result.conflicts).toEqual([]); - }); - - it("correctly identifies a directory with non-conflicting files", async () => { - const { root } = useFixture({ fixture: `is-folder-empty` }); - fs.writeFileSync(path.join(root, "LICENSE"), "MIT"); - const result = isFolderEmpty(root); - expect(result.isEmpty).toEqual(true); - expect(result.conflicts).toEqual([]); - }); - - it("correctly identifies a directory non-conflicting files (intelliJ)", async () => { - const { root } = useFixture({ fixture: `is-folder-empty` }); - fs.writeFileSync(path.join(root, "intellij-idea-config.iml"), "{}"); - const result = isFolderEmpty(root); - expect(result.isEmpty).toEqual(true); - expect(result.conflicts).toEqual([]); - }); - - it("correctly identifies a directory conflicting files", async () => { - const { root } = useFixture({ fixture: `is-folder-empty` }); - fs.writeFileSync(path.join(root, "README.md"), "my cool project"); - const result = isFolderEmpty(root); - expect(result.isEmpty).toEqual(false); - expect(result.conflicts).toEqual(["README.md"]); - }); -}); |
