From 16ce409910dabd0ef0b92b5c8a6657358e215e49 Mon Sep 17 00:00:00 2001 From: Max Nowack Date: Tue, 27 Feb 2024 09:11:48 +0100 Subject: [PATCH] test: improve coverage --- codecov.yml | 5 +++++ src/config.ts | 3 --- src/utils/git/isAncestor.ts | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 codecov.yml diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 0000000..26a0930 --- /dev/null +++ b/codecov.yml @@ -0,0 +1,5 @@ +coverage: + status: + project: + default: + target: 100% diff --git a/src/config.ts b/src/config.ts index 67291bb..97a2eea 100644 --- a/src/config.ts +++ b/src/config.ts @@ -43,9 +43,6 @@ export function addDependencyIfNotExists(config: Config, dependency: Dependency) const newConfig = { ...config, dependencies: [...config.dependencies || []] } if (!newConfig.dependencies.some(dep => dep.localPath === dependency.localPath)) { newConfig.dependencies.push(dependency) - } else { - /* istanbul ignore next -- @preserve */ - console.log(`Dependency with local path ${dependency.localPath} already exists. Dependency not added.`) // eslint-disable-line no-console } return newConfig } diff --git a/src/utils/git/isAncestor.ts b/src/utils/git/isAncestor.ts index 826d143..805bee1 100644 --- a/src/utils/git/isAncestor.ts +++ b/src/utils/git/isAncestor.ts @@ -3,7 +3,7 @@ import executeCommand from '../executeCommand.js' export default async function isAncestor( ancestor: string, descendant: string, - repoPath: string = process.cwd(), + repoPath: string, ) { return executeCommand(`git merge-base --is-ancestor ${ancestor} ${descendant}`, { cwd: repoPath,