Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
zharinov committed Apr 22, 2023
1 parent 0fe94e7 commit 9da8fbf
Showing 1 changed file with 6 additions and 15 deletions.
21 changes: 6 additions & 15 deletions lib/modules/manager/gradle/parser.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -737,21 +737,12 @@ describe('modules/manager/gradle/parser', () => {

describe('heuristic dependency matching', () => {
test.each`
input | output
${'("foo", "bar", "1.2.3")'} | ${{ depName: 'foo:bar', currentValue: '1.2.3' }}
${'("foo", "bar", "1.2.3", "4.5.6")'} | ${null}
${'(["foo", "bar", "1.2.3"])'} | ${null}
${'someMethod("foo", "bar", "1.2.3")'} | ${{ depName: 'foo:bar', currentValue: '1.2.3' }}
${'createXmlValueRemover("defaults", "integer", "integer")'} | ${null}
${'events("passed", "skipped", "failed")'} | ${null}
${'args("foo", "bar", "baz")'} | ${null}
${'arrayOf("foo", "bar", "baz")'} | ${null}
${'listOf("foo", "bar", "baz")'} | ${null}
${'mutableListOf("foo", "bar", "baz")'} | ${null}
${'setOf("foo", "bar", "baz")'} | ${null}
${'mutableSetOf("foo", "bar", "baz")'} | ${null}
${'stages("foo", "bar", "baz")'} | ${null}
${'mapScalar("foo", "bar", "baz")'} | ${null}
input | output
${'("foo", "bar", "1.2.3")'} | ${{ depName: 'foo:bar', currentValue: '1.2.3' }}
${'("foo", "bar", "1.2.3", "4.5.6")'} | ${null}
${'(["foo", "bar", "1.2.3"])'} | ${null}
${'someMethod("foo", "bar", "1.2.3")'} | ${{ depName: 'foo:bar', currentValue: '1.2.3' }}
${'listOf("foo", "bar", "baz")'} | ${null}
`('$input', ({ input, output }) => {
const { deps } = parseGradle(input);
expect(deps).toMatchObject([output].filter(is.truthy));
Expand Down

0 comments on commit 9da8fbf

Please sign in to comment.