Skip to content

Commit

Permalink
chore(manager/haskell-cabal): test getRangeStrategy
Browse files Browse the repository at this point in the history
  • Loading branch information
ysangkok committed Dec 18, 2024
1 parent 7575acd commit 70069e2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
13 changes: 12 additions & 1 deletion lib/modules/manager/haskell-cabal/index.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { extractPackageFile } from '.';
import { extractPackageFile, getRangeStrategy } from '.';

describe('modules/manager/haskell-cabal/index', () => {
describe('extractPackageFile()', () => {
Expand All @@ -19,4 +19,15 @@ describe('modules/manager/haskell-cabal/index', () => {
},
);
});

describe('getRangeStrategy()', () => {
it.each`
input | expected
${'auto'} | ${'widen'}
${'widen'} | ${'widen'}
${'replace'} | ${'replace'}
`('getRangeStrategy({ rangeStrategy: $input })', ({ input, expected }) => {
expect(getRangeStrategy({ rangeStrategy: input })).toBe(expected);
});
});
});
1 change: 0 additions & 1 deletion lib/modules/manager/haskell-cabal/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ export function extractPackageFile(content: string): PackageFileContent {
}

export function getRangeStrategy({
currentValue,
rangeStrategy,
}: RangeConfig): RangeStrategy {
if (rangeStrategy === 'auto') {
Expand Down

0 comments on commit 70069e2

Please sign in to comment.