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-ignore/__tests__/errors.test.ts | |
| parent | 94071d7ce16c56641d67d488e2bac6be84ffe731 (diff) | |
| download | HydroRoll-9029588590bea8b10451575c5142dcde77ecd1b5.tar.gz HydroRoll-9029588590bea8b10451575c5142dcde77ecd1b5.zip | |
chore: delete useless files
Diffstat (limited to 'packages/turbo-ignore/__tests__/errors.test.ts')
| -rw-r--r-- | packages/turbo-ignore/__tests__/errors.test.ts | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/packages/turbo-ignore/__tests__/errors.test.ts b/packages/turbo-ignore/__tests__/errors.test.ts deleted file mode 100644 index 18f26bd..0000000 --- a/packages/turbo-ignore/__tests__/errors.test.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { shouldWarn, NON_FATAL_ERRORS } from "../src/errors"; - -describe("shouldWarn()", () => { - it("it detects errors when packageManager is missing", async () => { - const result = shouldWarn({ - err: `run failed: We did not detect an in-use package manager for your project. Please set the "packageManager" property in your root package.json (https://nodejs.org/api/packages.html#packagemanager) or run \`npx @turbo/codemod add-package-manager\` in the root of your monorepo.`, - }); - expect(result.code).toBe("NO_PACKAGE_MANAGER"); - expect(result.level).toBe("warn"); - expect(result.message).toBe(NON_FATAL_ERRORS.NO_PACKAGE_MANAGER.message); - }); - - it("it detects errors when yarn lockfile is missing", async () => { - const result = shouldWarn({ - err: `* reading yarn.lock: open /test/../yarn.lock: no such file or directory`, - }); - expect(result.code).toBe("MISSING_LOCKFILE"); - expect(result.level).toBe("warn"); - expect(result.message).toBe(NON_FATAL_ERRORS.MISSING_LOCKFILE.message); - }); - - it("it detects errors when pnpm lockfile is missing", async () => { - const result = shouldWarn({ - err: `* reading pnpm-lock.yaml: open /test/../pnpm-lock.yaml: no such file or directory`, - }); - expect(result.code).toBe("MISSING_LOCKFILE"); - expect(result.level).toBe("warn"); - expect(result.message).toBe(NON_FATAL_ERRORS.MISSING_LOCKFILE.message); - }); - - it("it detects errors when npm lockfile is missing", async () => { - const result = shouldWarn({ - err: `* reading package-lock.json: open /test/../package-lock.json: no such file or directory`, - }); - expect(result.code).toBe("MISSING_LOCKFILE"); - expect(result.level).toBe("warn"); - expect(result.message).toBe(NON_FATAL_ERRORS.MISSING_LOCKFILE.message); - }); - - it("it returns unknown errors", async () => { - const result = shouldWarn({ err: `something bad happened` }); - expect(result.code).toBe("UNKNOWN_ERROR"); - expect(result.level).toBe("error"); - expect(result.message).toBe(`something bad happened`); - }); -}); |
