diff --git a/lib/config/presets/internal/regex-managers.spec.ts b/lib/config/presets/internal/regex-managers.spec.ts index 91bdd85ba6ecab56d1c4ba92abcc78307597fd13..0b7543994c3947375e877d9222d6ba961ad4f736 100644 --- a/lib/config/presets/internal/regex-managers.spec.ts +++ b/lib/config/presets/internal/regex-managers.spec.ts @@ -56,7 +56,7 @@ describe('config/presets/internal/regex-managers', () => { }); describe('matches regexes patterns', () => { - test.each` + it.each` path | expected ${'Dockerfile'} | ${true} ${'foo/Dockerfile'} | ${true} @@ -134,7 +134,7 @@ describe('config/presets/internal/regex-managers', () => { }); describe('matches regexes patterns', () => { - test.each` + it.each` path | expected ${'.github/workflows/foo.yaml'} | ${true} ${'.github/workflows/bar.yml'} | ${true} @@ -199,7 +199,7 @@ describe('config/presets/internal/regex-managers', () => { }); describe('matches regexes patterns', () => { - test.each` + it.each` path | expected ${'Chart.yaml'} | ${true} ${'foo/Chart.yaml'} | ${true} diff --git a/lib/modules/datasource/go/base.spec.ts b/lib/modules/datasource/go/base.spec.ts index 7c1b6c0f7aed0ae3a4507439166bcbdde2c9f170..0ad33fd4c565a410c7137eb66b0a88bfe84d79c0 100644 --- a/lib/modules/datasource/go/base.spec.ts +++ b/lib/modules/datasource/go/base.spec.ts @@ -13,7 +13,7 @@ const hostRules = mocked(_hostRules); describe('modules/datasource/go/base', () => { describe('simple cases', () => { - test.each` + it.each` module | datasource | packageName ${'gopkg.in/foo'} | ${'github-tags'} | ${'go-foo/foo'} ${'gopkg.in/foo/bar'} | ${'github-tags'} | ${'foo/bar'} diff --git a/lib/modules/datasource/helm/common.spec.ts b/lib/modules/datasource/helm/common.spec.ts index 19faa42fa3bd8dfe03b784aa3ebc51325ac6339f..cae8bbaab64b1108744b189e92dc887bc43f4944 100644 --- a/lib/modules/datasource/helm/common.spec.ts +++ b/lib/modules/datasource/helm/common.spec.ts @@ -10,7 +10,7 @@ const repo = load(Fixtures.get('sample.yaml'), { describe('modules/datasource/helm/common', () => { describe('findSourceUrl', () => { - test.each` + it.each` input | output ${'airflow'} | ${'https://github.com/bitnami/charts/tree/master/bitnami/airflow'} ${'coredns'} | ${'https://github.com/coredns/helm'} diff --git a/lib/modules/datasource/metadata.spec.ts b/lib/modules/datasource/metadata.spec.ts index 79e5650e440ea82f5b26a472c1a06abbebbeee1c..da55b5bd5f1ddd0954959c46cd814a54c115ac36 100644 --- a/lib/modules/datasource/metadata.spec.ts +++ b/lib/modules/datasource/metadata.spec.ts @@ -78,7 +78,7 @@ describe('modules/datasource/metadata', () => { }); }); - test.each` + it.each` sourceUrl | expectedSourceUrl | expectedSourceDirectory ${'https://github.com/bitnami/charts/tree/master/bitnami/kube-prometheus'} | ${'https://github.com/bitnami/charts'} | ${'bitnami/kube-prometheus'} ${'https://gitlab.com/group/sub-group/repo/tree/main/some/path'} | ${'https://gitlab.com/group/sub-group/repo'} | ${'some/path'} @@ -98,7 +98,7 @@ describe('modules/datasource/metadata', () => { } ); - test.each` + it.each` sourceUrl ${'https://github.com/bitnami'} ${'https://github.com/bitnami/charts'} @@ -297,7 +297,7 @@ describe('modules/datasource/metadata', () => { expect(massageUrl('not a url')).toMatch(''); }); - test.each` + it.each` sourceUrl ${'git@github.com:user/repo'} ${'http://github.com/user/repo'} @@ -311,7 +311,7 @@ describe('modules/datasource/metadata', () => { expect(massageUrl(sourceUrl)).toBe('https://github.com/user/repo'); }); - test.each` + it.each` sourceUrl ${'http://gitlab.com/user/repo'} ${'git://gitlab.com/user/repo'} @@ -323,7 +323,7 @@ describe('modules/datasource/metadata', () => { expect(massageUrl(sourceUrl)).toBe('https://gitlab.com/user/repo'); }); - test.each` + it.each` sourceUrl ${'git@example.com:user/repo'} ${'http://example.com/user/repo'} @@ -484,7 +484,7 @@ describe('modules/datasource/metadata', () => { }); }); - test.each` + it.each` sourceUrl | homepage | expected ${'not a url'} | ${'https://gitlab.com/org/repo'} | ${false} ${'https://gitlab.com/org/repo'} | ${'not a url'} | ${false} diff --git a/lib/modules/manager/deps-edn/parser.spec.ts b/lib/modules/manager/deps-edn/parser.spec.ts index b33a634cb03435c17cac5525188ab67ba1a3ea29..849ad2d54235481a58c7b82f84c7dac7f08182c6 100644 --- a/lib/modules/manager/deps-edn/parser.spec.ts +++ b/lib/modules/manager/deps-edn/parser.spec.ts @@ -4,7 +4,7 @@ import { parseDepsEdnFile } from './parser'; describe('modules/manager/deps-edn/parser', () => { describe('parseEdnFile', () => { - test.each` + it.each` input | output ${''} | ${undefined} ${':foo'} | ${undefined} diff --git a/lib/modules/manager/gradle/parser.spec.ts b/lib/modules/manager/gradle/parser.spec.ts index a0fab69af0b0643432a8dfa53b662e73a61bd134..2462903b8fe3d55fb6cafc4b5b64b5f8ed35118c 100644 --- a/lib/modules/manager/gradle/parser.spec.ts +++ b/lib/modules/manager/gradle/parser.spec.ts @@ -25,7 +25,7 @@ describe('modules/manager/gradle/parser', () => { describe('variables', () => { describe('Groovy: single var assignments', () => { - test.each` + it.each` input | name | value ${'foo = "1.2.3"'} | ${'foo'} | ${'1.2.3'} ${'foo.bar = "1.2.3"'} | ${'foo.bar'} | ${'1.2.3'} @@ -50,7 +50,7 @@ describe('modules/manager/gradle/parser', () => { }); describe('Groovy: single var assignments (non-match)', () => { - test.each` + it.each` input ${'foo[["bar"]] = "baz"'} ${'foo["bar", "invalid"] = "1.2.3"'} @@ -192,7 +192,7 @@ describe('modules/manager/gradle/parser', () => { }); describe('Kotlin: single var assignments', () => { - test.each` + it.each` input | name | value ${'set("foo", "1.2.3")'} | ${'foo'} | ${'1.2.3'} ${'version("foo", "1.2.3")'} | ${'foo'} | ${'1.2.3'} @@ -204,7 +204,7 @@ describe('modules/manager/gradle/parser', () => { }); describe('Kotlin: single var assignments (non-match)', () => { - test.each` + it.each` input ${'set(["foo", "bar"])'} ${'set("foo", "bar", "baz", "qux"])'} @@ -215,7 +215,7 @@ describe('modules/manager/gradle/parser', () => { }); describe('Kotlin: single extra var assignments', () => { - test.each` + it.each` input | name | value ${'val foo by extra("1.2.3")'} | ${'foo'} | ${'1.2.3'} ${'val foo by extra { "1.2.3" }'} | ${'foo'} | ${'1.2.3'} @@ -333,7 +333,7 @@ describe('modules/manager/gradle/parser', () => { describe('dependencies', () => { describe('simple dependency strings', () => { - test.each` + it.each` input | output ${'"foo:bar:1.2.3"'} | ${{ depName: 'foo:bar', currentValue: '1.2.3' }} ${'"foo:bar:1.2.3@zip"'} | ${{ depName: 'foo:bar', currentValue: '1.2.3', dataType: 'zip' }} @@ -347,7 +347,7 @@ describe('modules/manager/gradle/parser', () => { }); describe('interpolated dependency strings', () => { - test.each` + it.each` def | str | output ${'foo = "1.2.3"'} | ${'"foo:bar:$foo@@@"'} | ${null} ${''} | ${'"foo:bar:$baz"'} | ${null} @@ -370,7 +370,7 @@ describe('modules/manager/gradle/parser', () => { }); describe('concatenated dependency strings', () => { - test.each` + it.each` def | str | output ${''} | ${'"foo:bar" + ":1.2.3"'} | ${{ depName: 'foo:bar', currentValue: '1.2.3', managerData: { fileReplacePosition: 15 } }} ${''} | ${'"foo:bar:" + "1.2.3"'} | ${{ depName: 'foo:bar', currentValue: '1.2.3', managerData: { fileReplacePosition: 15 } }} @@ -391,7 +391,7 @@ describe('modules/manager/gradle/parser', () => { }); describe('property accessors', () => { - test.each` + it.each` accessor ${'property'} ${'getProperty'} @@ -425,7 +425,7 @@ describe('modules/manager/gradle/parser', () => { currentValue: '1.2.3', }; - test.each` + it.each` def | str | output ${''} | ${'kotlin("foo", "1.2.3")'} | ${output} ${''} | ${'kotlin("foo", version = "1.2.3")'} | ${output} @@ -447,7 +447,7 @@ describe('modules/manager/gradle/parser', () => { }); describe('map notation dependencies', () => { - test.each` + it.each` def | str | output ${''} | ${'group: "foo", name: "bar", version: "1.2.3"'} | ${{ depName: 'foo:bar', currentValue: '1.2.3' }} ${''} | ${'group: "foo", name: "bar", version: baz'} | ${null} @@ -526,7 +526,7 @@ describe('modules/manager/gradle/parser', () => { return { ...dep, groupName: 'baz' }; }); - test.each` + it.each` def | str | output ${''} | ${'dependencySet([group: "foo", version: "1.2.3"]) { entry "bar1" }'} | ${{}} ${''} | ${'dependencySet(group: "foo", version: "1.2.3", group: "foo", version: "1.2.3") { entry "bar1" }'} | ${{}} @@ -553,7 +553,7 @@ describe('modules/manager/gradle/parser', () => { }); describe('plugins', () => { - test.each` + it.each` def | input | output ${''} | ${'id "foo.bar" version "1.2.3"'} | ${{ depName: 'foo.bar', packageName: 'foo.bar:foo.bar.gradle.plugin', currentValue: '1.2.3' }} ${''} | ${'id("foo.bar").version("1.2.3")'} | ${{ depName: 'foo.bar', packageName: 'foo.bar:foo.bar.gradle.plugin', currentValue: '1.2.3' }} @@ -586,7 +586,7 @@ describe('modules/manager/gradle/parser', () => { describe('registries', () => { describe('predefined registries', () => { - test.each` + it.each` input | output ${'mavenCentral()'} | ${REGISTRY_URLS.mavenCentral} ${'google()'} | ${REGISTRY_URLS.google} @@ -600,7 +600,7 @@ describe('modules/manager/gradle/parser', () => { }); describe('custom registries', () => { - test.each` + it.each` def | input | url ${''} | ${'maven("")'} | ${null} ${''} | ${'maven(["https://foo.bar/baz/qux"])'} | ${null} @@ -702,7 +702,7 @@ describe('modules/manager/gradle/parser', () => { }); describe('version catalog', () => { - test.each` + it.each` def | str | output ${''} | ${'library("foo.bar", "foo", "bar").version("1.2.3")'} | ${{ depName: 'foo:bar', currentValue: '1.2.3' }} ${'baz = "1.2.3"'} | ${'library("foo.bar", "foo", "bar").version(baz)'} | ${{ depName: 'foo:bar', currentValue: '1.2.3' }} @@ -736,7 +736,7 @@ describe('modules/manager/gradle/parser', () => { }); describe('heuristic dependency matching', () => { - test.each` + it.each` input | output ${'("foo", "bar", "1.2.3")'} | ${{ depName: 'foo:bar', currentValue: '1.2.3' }} ${'("foo", "bar", "1.2.3", "4.5.6")'} | ${null} @@ -774,7 +774,7 @@ describe('modules/manager/gradle/parser', () => { }); describe('gradle.properties', () => { - test.each` + it.each` input | key | value | fileReplacePosition ${'foo=bar'} | ${'foo'} | ${'bar'} | ${4} ${' foo = bar '} | ${'foo'} | ${'bar'} | ${7} @@ -836,7 +836,7 @@ describe('modules/manager/gradle/parser', () => { 'foo/bar.gradle': key + ' = "' + value + '"', }; - test.each` + it.each` def | input | output ${''} | ${'apply from: ""'} | ${{}} ${''} | ${'apply from: "foo/invalid.gradle"'} | ${{}} @@ -898,7 +898,7 @@ describe('modules/manager/gradle/parser', () => { }); describe('implicit gradle plugins', () => { - test.each` + it.each` def | input | output ${'baz = "1.2.3"'} | ${'checkstyle { toolVersion = "${baz}" }'} | ${{ depName: 'checkstyle', packageName: GRADLE_PLUGINS['checkstyle'][1], currentValue: '1.2.3' }} ${'baz = "1.2.3"'} | ${'checkstyle { toolVersion "${baz}" }'} | ${{ depName: 'checkstyle', packageName: GRADLE_PLUGINS['checkstyle'][1], currentValue: '1.2.3' }} diff --git a/lib/modules/manager/hermit/default-config.spec.ts b/lib/modules/manager/hermit/default-config.spec.ts index f3cf2c987a20c2270660a329cd4b61e4706ed094..3eacc00f3c1eb02789712f9caafff9767c05accc 100644 --- a/lib/modules/manager/hermit/default-config.spec.ts +++ b/lib/modules/manager/hermit/default-config.spec.ts @@ -10,7 +10,7 @@ describe('modules/manager/hermit/default-config', () => { }); } - test.each` + it.each` path | expected ${'bin/hermit'} | ${true} ${'gradle/bin/hermit'} | ${true} @@ -27,7 +27,7 @@ describe('modules/manager/hermit/default-config', () => { }); describe('fileMatch', () => { - test.each` + it.each` path | expected ${'bin/hermit'} | ${true} ${'gradle/bin/hermit'} | ${true} diff --git a/lib/modules/manager/metadata.spec.ts b/lib/modules/manager/metadata.spec.ts index ee0a675dd3841468d279fa1daa1fe1be0d66a68c..53777646768f235a0954bdc504a6a3f86fe8bc62 100644 --- a/lib/modules/manager/metadata.spec.ts +++ b/lib/modules/manager/metadata.spec.ts @@ -8,7 +8,7 @@ describe('modules/manager/metadata', () => { .filter((name) => !name.startsWith('__')) .sort(); - test.each(managerList)('%s has readme with no h1 or h2', async (manager) => { + it.each(managerList)('%s has readme with no h1 or h2', async (manager) => { let readme: string | undefined; try { readme = await fs.readFile(`${__dirname}/${manager}/readme.md`, 'utf8'); diff --git a/lib/modules/platform/github/massage-markdown-links.spec.ts b/lib/modules/platform/github/massage-markdown-links.spec.ts index dec2394376b59687208eff9ecc1cb14ad1a4e523..880144c6cf60153e21db22203ba5147874589eaa 100644 --- a/lib/modules/platform/github/massage-markdown-links.spec.ts +++ b/lib/modules/platform/github/massage-markdown-links.spec.ts @@ -15,7 +15,7 @@ describe('modules/platform/github/massage-markdown-links', () => { ); }); - test.each` + it.each` input ${'github.com'} ${'github.com/foo/bar'} @@ -57,7 +57,7 @@ describe('modules/platform/github/massage-markdown-links', () => { expect(massageMarkdownLinks(inputLink)).toEqual(inputLink); }); - test.each` + it.each` input | output ${'github.com/foo/bar/discussions/1'} | ${'[github.com/foo/bar/discussions/1](togithub.com/foo/bar/discussions/1)'} ${'github.com/foo/bar/issues/1'} | ${'[github.com/foo/bar/issues/1](togithub.com/foo/bar/issues/1)'} diff --git a/lib/modules/versioning/cargo/index.spec.ts b/lib/modules/versioning/cargo/index.spec.ts index c9cc7d47f098a816404c8a57f9f92917b5cbe082..0af20dad3485f806225284a5316d646a2f970ccb 100644 --- a/lib/modules/versioning/cargo/index.spec.ts +++ b/lib/modules/versioning/cargo/index.spec.ts @@ -1,7 +1,7 @@ import { api as semver } from '.'; describe('modules/versioning/cargo/index', () => { - test.each` + it.each` version | range | expected ${'4.2.0'} | ${'4.2, >= 3.0, < 5.0.0'} | ${true} ${'4.2.0'} | ${'2.0, >= 3.0, < 5.0.0'} | ${false} @@ -15,7 +15,7 @@ describe('modules/versioning/cargo/index', () => { } ); - test.each` + it.each` versions | range | expected ${['4.2.1', '0.4.0', '0.5.0', '4.0.0', '4.2.0', '5.0.0']} | ${'4.*.0, < 4.2.5'} | ${'4.2.1'} ${['0.4.0', '0.5.0', '4.0.0', '4.2.0', '5.0.0', '5.0.3']} | ${'5.0, > 5.0.0'} | ${'5.0.3'} @@ -26,7 +26,7 @@ describe('modules/versioning/cargo/index', () => { } ); - test.each` + it.each` version | expected ${'1'} | ${true} ${'1.2'} | ${true} @@ -40,7 +40,7 @@ describe('modules/versioning/cargo/index', () => { expect(!!semver.isValid(version)).toBe(expected); }); - test.each` + it.each` version | expected ${'1'} | ${false} ${'1.2'} | ${false} @@ -49,7 +49,7 @@ describe('modules/versioning/cargo/index', () => { expect(!!semver.isVersion(version)).toBe(expected); }); - test.each` + it.each` version | range | expected ${'0.9.0'} | ${'>= 1.0.0 <= 2.0.0'} | ${true} ${'1.9.0'} | ${'>= 1.0.0 <= 2.0.0'} | ${false} @@ -60,7 +60,7 @@ describe('modules/versioning/cargo/index', () => { } ); - test.each` + it.each` versions | range | expected ${['0.4.0', '0.5.0', '4.2.0', '4.3.0', '5.0.0']} | ${'4.*, > 4.2'} | ${'4.3.0'} ${['0.4.0', '0.5.0', '4.2.0', '5.0.0']} | ${'4.0.0'} | ${'4.2.0'} @@ -74,7 +74,7 @@ describe('modules/versioning/cargo/index', () => { } ); - test.each` + it.each` version | expected ${'1.2.3'} | ${false} ${'1.2.3-alpha.1'} | ${false} @@ -90,7 +90,7 @@ describe('modules/versioning/cargo/index', () => { expect(!!semver.isSingleVersion(version)).toBe(expected); }); - test.each` + it.each` currentValue | rangeStrategy | currentVersion | newVersion | expected ${'*'} | ${'pin'} | ${'1.0.0'} | ${'1.0.0'} | ${'=1.0.0'} ${'1'} | ${'pin'} | ${'1.0.0'} | ${'1.0.0'} | ${'=1.0.0'} diff --git a/lib/modules/versioning/composer/index.spec.ts b/lib/modules/versioning/composer/index.spec.ts index 63eaed7e24706d29cacb68c806927fb510ec188b..f11774f78c33087e2ba272088ea5098f75bec3f9 100644 --- a/lib/modules/versioning/composer/index.spec.ts +++ b/lib/modules/versioning/composer/index.spec.ts @@ -1,14 +1,14 @@ import { api as semver } from '.'; describe('modules/versioning/composer/index', () => { - test.each` + it.each` version | expected ${'1.2.0'} | ${0} `('getPatch("$version") === $expected', ({ version, expected }) => { expect(semver.getPatch(version)).toBe(expected); }); - test.each` + it.each` a | b | expected ${'1.2.0'} | ${'v1.2'} | ${true} ${'v1.0.0'} | ${'1'} | ${true} @@ -19,7 +19,7 @@ describe('modules/versioning/composer/index', () => { expect(semver.equals(a, b)).toBe(expected); }); - test.each` + it.each` a | b | expected ${'1.2.0'} | ${'v1.2'} | ${false} ${'v1.0.1'} | ${'1'} | ${true} @@ -28,7 +28,7 @@ describe('modules/versioning/composer/index', () => { expect(semver.isGreaterThan(a, b)).toBe(expected); }); - test.each` + it.each` version | expected ${'v1.2'} | ${true} `('isSingleVersion("$version") === $expected', ({ version, expected }) => { @@ -36,7 +36,7 @@ describe('modules/versioning/composer/index', () => { expect(res).toBe(expected); }); - test.each` + it.each` version | expected ${'v1.2'} | ${true} `('isStable("$version") === $expected', ({ version, expected }) => { @@ -44,7 +44,7 @@ describe('modules/versioning/composer/index', () => { expect(res).toBe(expected); }); - test.each` + it.each` version | expected ${'1.2.3'} | ${true} ${'1.2.3-foo'} | ${true} @@ -74,7 +74,7 @@ describe('modules/versioning/composer/index', () => { expect(res).toBe(expected); }); - test.each` + it.each` a | b | expected ${'0.3.1'} | ${'~0.4'} | ${true} ${'0.5.1'} | ${'~0.4'} | ${false} @@ -82,7 +82,7 @@ describe('modules/versioning/composer/index', () => { expect(semver.isLessThanRange?.(a, b)).toBe(expected); }); - test.each` + it.each` versions | range | expected ${['0.4.0', '0.5.0', '4.0.0', '4.2.0', '5.0.0']} | ${'~6'} | ${null} ${['0.4.0', '0.5.0', '4.0.0', '4.2.0', '5.0.0']} | ${'~4'} | ${'4.2.0'} @@ -96,7 +96,7 @@ describe('modules/versioning/composer/index', () => { } ); - test.each` + it.each` versions | range | expected ${['0.4.0', '0.5.0', '4.0.0', '4.2.0', '5.0.0']} | ${'~6'} | ${null} ${['0.4.0', '0.5.0', '4.0.0', '4.2.0', '5.0.0']} | ${'~4'} | ${'4.0.0'} @@ -110,7 +110,7 @@ describe('modules/versioning/composer/index', () => { } ); - test.each` + it.each` a | b | expected ${'0.3.1'} | ${'~0.4'} | ${false} ${'0.5.1'} | ${'~0.4'} | ${true} @@ -118,7 +118,7 @@ describe('modules/versioning/composer/index', () => { expect(semver.matches(a, b)).toBe(expected); }); - test.each` + it.each` a | b | expected ${'1.0.0'} | ${'1.0.0'} | ${true} ${'1.0.0'} | ${'>=1.0.0'} | ${true} @@ -138,7 +138,7 @@ describe('modules/versioning/composer/index', () => { expect(semver.subset!(a, b)).toBe(expected); }); - test.each` + it.each` currentValue | rangeStrategy | currentVersion | newVersion | expected ${'~1.0'} | ${'pin'} | ${'1.0'} | ${'V1.1'} | ${'V1.1'} ${'^1.0'} | ${'pin'} | ${'1.0'} | ${'V1.1'} | ${'V1.1'} @@ -196,14 +196,14 @@ describe('modules/versioning/composer/index', () => { } ); - test.each` + it.each` versions | expected ${['1.2.3-beta', '1.0.0-alpha24', '2.0.1', '1.3.4', '1.0.0-alpha9', '1.2.3']} | ${['1.0.0-alpha9', '1.0.0-alpha24', '1.2.3-beta', '1.2.3', '1.3.4', '2.0.1']} `('$versions -> sortVersions -> $expected ', ({ versions, expected }) => { expect(versions.sort(semver.sortVersions)).toEqual(expected); }); - test.each` + it.each` version | expected ${'1.2.0'} | ${true} `('isCompatible("$version") === $expected', ({ version, expected }) => { diff --git a/lib/modules/versioning/conan/index.spec.ts b/lib/modules/versioning/conan/index.spec.ts index 5a42cdb135cf58e467039142f4cf137d03bc2d1b..8d88c2a465060741e76bbe1ead71b52da5c737a1 100644 --- a/lib/modules/versioning/conan/index.spec.ts +++ b/lib/modules/versioning/conan/index.spec.ts @@ -2,7 +2,7 @@ import { api as conan } from '.'; describe('modules/versioning/conan/index', () => { // isValid(version: string): boolean; - test.each` + it.each` version | result ${'[1.2.3.4, loose=False]'} | ${false} ${'[NOT VALID, loose=False]'} | ${false} @@ -114,7 +114,7 @@ describe('modules/versioning/conan/index', () => { // isVersion(version: string): boolean; // isSingleVersion(version: string): boolean; - test.each` + it.each` version | result ${'1.0.7-prerelease.1'} | ${true} ${'1.0.7-prerelease.1, include_prerelease=True'} | ${true} @@ -160,7 +160,7 @@ describe('modules/versioning/conan/index', () => { }); // isCompatible(version: string, range?: string): boolean; - test.each` + it.each` range | version | result ${'[>1.1 <2.0]'} | ${'1.2.3'} | ${true} ${'["~1.2.3", loose=False, include_prerelease=True]'} | ${'1.2.3-pre.1'} | ${false} @@ -355,7 +355,7 @@ describe('modules/versioning/conan/index', () => { ); // matches(version: string, range: string | Range): string | boolean | null; - test.each` + it.each` range | version | result ${'[>1.1 <2.0]'} | ${'1.2.3'} | ${true} ${'["~1.2.3", loose=False, include_prerelease=True]'} | ${'1.2.3-pre.1'} | ${true} @@ -550,7 +550,7 @@ describe('modules/versioning/conan/index', () => { ); // isStable(version: string): boolean; - test.each` + it.each` version | result ${'5.0.1'} | ${true} ${'19.00'} | ${true} @@ -562,7 +562,7 @@ describe('modules/versioning/conan/index', () => { }); // getNewValue(newValueConfig: NewValueConfig): string; - test.each` + it.each` currentValue | rangeStrategy | currentVersion | newVersion | result ${'[<=1.2.3]'} | ${'widen'} | ${'1.0.0'} | ${'1.2.3'} | ${'[<=1.2.3]'} ${'[<1.2.3]'} | ${'widen'} | ${'1.5.5'} | ${'1.5.6'} | ${'[<1.5.7]'} @@ -647,7 +647,7 @@ describe('modules/versioning/conan/index', () => { ); // getSatisfyingVersion(versions: string[], range: string): string | null; - test.each` + it.each` versions | range | result ${['1.2.4', '1.2.3', '1.2.5-beta']} | ${'["~1.2.3", loose=False, include_prerelease=True]'} | ${'1.2.5-beta'} ${['1.2.4', '1.2.3', '1.2.5-beta']} | ${'["~1.2.3", loose=False, include_prerelease=False]'} | ${'1.2.4'} @@ -705,7 +705,7 @@ describe('modules/versioning/conan/index', () => { ); // minSatisfyingVersion(versions: string[], range: string): string | null; - test.each` + it.each` versions | range | result ${['1.2.3', '1.2.4', '1.2.5', '1.2.6', '2.0.1']} | ${'["~1.2.3", loose=False]'} | ${'1.2.3'} ${['1.1.0', '1.2.0', '1.3.0', '2.0.0b1', '2.0.0b3', '2.0.0', '2.1.0']} | ${'[~2.0.0]'} | ${'2.0.0'} @@ -726,7 +726,7 @@ describe('modules/versioning/conan/index', () => { ); // test 4-digit - test.each` + it.each` version | major | minor | patch ${'4.1.3'} | ${4} | ${1} | ${3} ${'4.1.3+jenkins'} | ${4} | ${1} | ${3} @@ -749,7 +749,7 @@ describe('modules/versioning/conan/index', () => { ); // getMajor(version: string): null | number; - test.each` + it.each` version | result ${'4.1.33.2'} | ${4} `('getMajor("$version") === "$result"', ({ version, result }) => { @@ -758,7 +758,7 @@ describe('modules/versioning/conan/index', () => { }); // getMinor(version: string): null | number; - test.each` + it.each` version | result ${'1.2.3'} | ${2} ${'5.2.1'} | ${2} @@ -769,7 +769,7 @@ describe('modules/versioning/conan/index', () => { }); // getPatch(version: string): null | number; - test.each` + it.each` version | result ${'1.2.3'} | ${3} ${'5.2.1'} | ${1} @@ -780,7 +780,7 @@ describe('modules/versioning/conan/index', () => { }); // equals(version: string, other: string): boolean; - test.each` + it.each` version | other | result ${'1.2.3'} | ${'1.2.3'} | ${true} ${'2.3.1'} | ${'1.2.3'} | ${false} @@ -831,7 +831,7 @@ describe('modules/versioning/conan/index', () => { ); // isGreaterThan(version: string, other: string): boolean; - test.each` + it.each` version | other | result ${'1.2.3'} | ${'1.2.3'} | ${false} ${'19.00'} | ${'16.00'} | ${true} @@ -877,7 +877,7 @@ describe('modules/versioning/conan/index', () => { ); // sortVersions(version: string, other: string): boolean; - test.each` + it.each` version | other | result ${'1.2'} | ${'1.3'} | ${-1} ${'1.2.3'} | ${'1.2.3'} | ${0} @@ -892,7 +892,7 @@ describe('modules/versioning/conan/index', () => { ); // isLessThanRange(version: string, range: string): boolean; - test.each` + it.each` version | range | result ${'1.2.3'} | ${'[>1.2.3]'} | ${true} ${'2.3.1'} | ${'[>1.2.3]'} | ${false} diff --git a/lib/modules/versioning/deb/index.spec.ts b/lib/modules/versioning/deb/index.spec.ts index f571a9674b6f45b5ddeb9b0ea1e2b54b571aca02..9fb3d4009a543cc0c70ac7376b928cda3967c519 100644 --- a/lib/modules/versioning/deb/index.spec.ts +++ b/lib/modules/versioning/deb/index.spec.ts @@ -1,7 +1,7 @@ import deb from '.'; describe('modules/versioning/deb/index', () => { - test.each` + it.each` version | expected ${'1.1'} | ${true} ${'1.3.RC2'} | ${true} @@ -57,7 +57,7 @@ describe('modules/versioning/deb/index', () => { expect(deb.isValid(version)).toBe(expected); }); - test.each` + it.each` a | b | expected ${'2.4'} | ${'2.4'} | ${true} ${'2.4.0'} | ${'2.4.0'} | ${true} @@ -81,7 +81,7 @@ describe('modules/versioning/deb/index', () => { expect(deb.equals(a, b)).toBe(expected); }); - test.each` + it.each` a | b | expected ${'2.4.0'} | ${'2.4'} | ${true} ${'2.4.2'} | ${'2.4.1'} | ${true} @@ -125,7 +125,7 @@ describe('modules/versioning/deb/index', () => { expect(deb.isGreaterThan(a, b)).toBe(expected); }); - test.each` + it.each` version | expected ${'1.2.0'} | ${true} ${'^1.2.0'} | ${false} @@ -133,7 +133,7 @@ describe('modules/versioning/deb/index', () => { expect(deb.isSingleVersion(version)).toBe(expected); }); - test.each` + it.each` version | expected ${'v1.3.0'} | ${1} ${'2-0-1'} | ${2} @@ -146,7 +146,7 @@ describe('modules/versioning/deb/index', () => { expect(deb.getMajor(version)).toBe(expected); }); - test.each` + it.each` version | expected ${'v1.3.0'} | ${3} ${'2-0-1'} | ${0} @@ -159,7 +159,7 @@ describe('modules/versioning/deb/index', () => { expect(deb.getMinor(version)).toBe(expected); }); - test.each` + it.each` version | expected ${'v1.3.0'} | ${0} ${'2-0-1'} | ${1} diff --git a/lib/modules/versioning/docker/index.spec.ts b/lib/modules/versioning/docker/index.spec.ts index 381ed03e0a5d35027e5b41233d36db800810366f..1eaf606278a3cd2c385048907bc1f83d9a04de2c 100644 --- a/lib/modules/versioning/docker/index.spec.ts +++ b/lib/modules/versioning/docker/index.spec.ts @@ -2,7 +2,7 @@ import semver from '../semver'; import docker from '.'; describe('modules/versioning/docker/index', () => { - test.each` + it.each` version | expected ${null} | ${false} ${'1.2.3'} | ${true} @@ -24,7 +24,7 @@ describe('modules/versioning/docker/index', () => { expect(!!res).toBe(expected); }); - test.each` + it.each` version | major | minor | patch ${'1.2.3'} | ${1} | ${2} | ${3} ${'18.04'} | ${18} | ${4} | ${null} @@ -40,7 +40,7 @@ describe('modules/versioning/docker/index', () => { } ); - test.each` + it.each` a | b | expected ${'1.2.3'} | ${'1.2'} | ${false} ${'18.04'} | ${'18.1'} | ${true} @@ -51,7 +51,7 @@ describe('modules/versioning/docker/index', () => { expect(docker.isGreaterThan(a, b)).toBe(expected); }); - test.each` + it.each` version | range | expected ${'1.2.3'} | ${'2.0'} | ${true} ${'18.04'} | ${'18.1'} | ${false} @@ -65,7 +65,7 @@ describe('modules/versioning/docker/index', () => { } ); - test.each` + it.each` a | b | expected ${'1.2.3'} | ${'1.2.3'} | ${true} ${'18.04'} | ${'18.4'} | ${true} @@ -89,7 +89,7 @@ describe('modules/versioning/docker/index', () => { '2', ]; - test.each` + it.each` version | expected ${'1.2.3'} | ${'1.2.3'} ${'1.2'} | ${'1.2'} @@ -105,7 +105,7 @@ describe('modules/versioning/docker/index', () => { }); describe('sortVersions(v1, v2)', () => { - test.each` + it.each` a | b ${'1.1.1'} | ${'1.2.3'} ${'1.2.3'} | ${'1.3.4'} @@ -145,7 +145,7 @@ describe('modules/versioning/docker/index', () => { }); }); - test.each` + it.each` currentValue | rangeStrategy | currentVersion | newVersion | expected ${null} | ${null} | ${null} | ${'1.2.3'} | ${'1.2.3'} `( @@ -161,7 +161,7 @@ describe('modules/versioning/docker/index', () => { } ); - test.each` + it.each` version | expected ${'3.7.0'} | ${true} ${'3.7.0b1'} | ${false} @@ -174,7 +174,7 @@ describe('modules/versioning/docker/index', () => { expect(!!res).toBe(expected); }); - test.each` + it.each` version | range | expected ${'3.7.0'} | ${'3.7.0'} | ${true} ${'3.7.0b1'} | ${'3.7.0'} | ${true} @@ -196,7 +196,7 @@ describe('modules/versioning/docker/index', () => { } ); - test.each` + it.each` value | expected ${'3.7.0'} | ${'3.7.0'} ${'3.7.0b1'} | ${'3.7.0b1'} diff --git a/lib/modules/versioning/git/index.spec.ts b/lib/modules/versioning/git/index.spec.ts index b8b45870b690c26b6ddb73d441d1f43f54acf785..ede7a0fe2a366f54000e43d6fc858e5c942476dc 100644 --- a/lib/modules/versioning/git/index.spec.ts +++ b/lib/modules/versioning/git/index.spec.ts @@ -1,7 +1,7 @@ import git from '.'; describe('modules/versioning/git/index', () => { - test.each` + it.each` input | expected ${''} | ${false} ${'2'} | ${false} @@ -17,7 +17,7 @@ describe('modules/versioning/git/index', () => { expect(git.isValid(input)).toBe(expected); }); - test.each` + it.each` version | range | expected ${''} | ${''} | ${false} ${'1234567890aBcDeF'} | ${''} | ${true} @@ -29,7 +29,7 @@ describe('modules/versioning/git/index', () => { } ); - test.each` + it.each` a | b | expected ${''} | ${''} | ${false} ${'abc'} | ${'bca'} | ${false} diff --git a/lib/modules/versioning/go-mod-directive/index.spec.ts b/lib/modules/versioning/go-mod-directive/index.spec.ts index 1a0fa03780b27496bff9c000ab9c20cb68720c62..b19faa97e831d69b3b86c22cacfda3f27652a45b 100644 --- a/lib/modules/versioning/go-mod-directive/index.spec.ts +++ b/lib/modules/versioning/go-mod-directive/index.spec.ts @@ -1,7 +1,7 @@ import { api as semver } from '.'; describe('modules/versioning/go-mod-directive/index', () => { - test.each` + it.each` version | range | expected ${'1.16.0'} | ${'1.16'} | ${true} ${'1.16.1'} | ${'1.16'} | ${true} @@ -15,7 +15,7 @@ describe('modules/versioning/go-mod-directive/index', () => { } ); - test.each` + it.each` versions | range | expected ${['1.16.0', '1.16.1', '1.17.0']} | ${'1.16'} | ${'1.17.0'} `( @@ -25,7 +25,7 @@ describe('modules/versioning/go-mod-directive/index', () => { } ); - test.each` + it.each` version | expected ${'1'} | ${false} ${'1.2'} | ${true} @@ -34,7 +34,7 @@ describe('modules/versioning/go-mod-directive/index', () => { expect(!!semver.isValid(version)).toBe(expected); }); - test.each` + it.each` version | expected ${'1'} | ${false} ${'1.2'} | ${false} @@ -43,7 +43,7 @@ describe('modules/versioning/go-mod-directive/index', () => { expect(!!semver.isVersion(version)).toBe(expected); }); - test.each` + it.each` version | range | expected ${'1.15.0'} | ${'1.16'} | ${true} ${'1.19.0'} | ${'1.16'} | ${false} @@ -54,7 +54,7 @@ describe('modules/versioning/go-mod-directive/index', () => { } ); - test.each` + it.each` versions | range | expected ${['1.15.0', '1.16.0', '1.16.1']} | ${'1.16'} | ${'1.16.0'} ${['0.4.0', '0.5.0', '4.2.0', '5.0.0']} | ${'1.16'} | ${null} @@ -65,7 +65,7 @@ describe('modules/versioning/go-mod-directive/index', () => { } ); - test.each` + it.each` currentValue | rangeStrategy | currentVersion | newVersion | expected ${'1.16'} | ${'bump'} | ${'1.16.4'} | ${'1.17.0'} | ${'1.17'} ${'1.16'} | ${'bump'} | ${'1.16.4'} | ${'1.16.4'} | ${'1.16'} diff --git a/lib/modules/versioning/gradle/index.spec.ts b/lib/modules/versioning/gradle/index.spec.ts index e11de0e3336c9e58739e6650c7d634d80815724e..a4a727a4e47c6a0a5f75b9367388282b01cc276e 100644 --- a/lib/modules/versioning/gradle/index.spec.ts +++ b/lib/modules/versioning/gradle/index.spec.ts @@ -2,7 +2,7 @@ import { compare, parseMavenBasedRange, parsePrefixRange } from './compare'; import { api } from '.'; describe('modules/versioning/gradle/index', () => { - test.each` + it.each` a | b | expected ${'1'} | ${'1'} | ${0} ${'a'} | ${'a'} | ${0} @@ -80,7 +80,7 @@ describe('modules/versioning/gradle/index', () => { expect(compare(a, b)).toEqual(expected); }); - test.each` + it.each` rangeStr ${''} ${'1.2.3-SNAPSHOT'} @@ -91,7 +91,7 @@ describe('modules/versioning/gradle/index', () => { expect(range).toBeNull(); }); - test.each` + it.each` rangeStr ${''} ${'1.2.3-SNAPSHOT'} @@ -113,7 +113,7 @@ describe('modules/versioning/gradle/index', () => { expect(range).toBeNull(); }); - test.each` + it.each` input | expected ${'1.0.0'} | ${true} ${'[1.12.6,1.18.6]'} | ${true} @@ -122,7 +122,7 @@ describe('modules/versioning/gradle/index', () => { expect(api.isValid(input)).toBe(expected); }); - test.each` + it.each` input | expected ${''} | ${false} ${'latest.integration'} | ${false} @@ -152,7 +152,7 @@ describe('modules/versioning/gradle/index', () => { expect(api.isVersion(input)).toBe(expected); }); - test.each` + it.each` input | expected ${''} | ${false} ${'latest'} | ${false} @@ -186,7 +186,7 @@ describe('modules/versioning/gradle/index', () => { expect(api.isStable(input)).toBe(expected); }); - test.each` + it.each` input | major | minor | patch ${''} | ${null} | ${null} | ${null} ${'1'} | ${1} | ${0} | ${0} @@ -207,7 +207,7 @@ describe('modules/versioning/gradle/index', () => { } ); - test.each` + it.each` version | range | expected ${'1'} | ${'[[]]'} | ${false} ${'0'} | ${'[0,1]'} | ${true} @@ -235,14 +235,14 @@ describe('modules/versioning/gradle/index', () => { } ); - test.each` + it.each` a | b | expected ${'1.1'} | ${'1'} | ${true} `('isGreaterThan("$a", "$b") === $expected', ({ a, b, expected }) => { expect(api.isGreaterThan(a, b)).toBe(expected); }); - test.each` + it.each` versions | range | expected ${['0', '1.5', '1', '2']} | ${'1.+'} | ${'1'} `( @@ -252,7 +252,7 @@ describe('modules/versioning/gradle/index', () => { } ); - test.each` + it.each` versions | range | expected ${['0', '1', '1.5', '2']} | ${'1.+'} | ${'1.5'} `( @@ -262,7 +262,7 @@ describe('modules/versioning/gradle/index', () => { } ); - test.each` + it.each` currentValue | rangeStrategy | currentVersion | newVersion | expected ${'1'} | ${null} | ${null} | ${'1.1'} | ${'1.1'} ${'[1.2.3,]'} | ${null} | ${null} | ${'1.2.4'} | ${null} diff --git a/lib/modules/versioning/hashicorp/convertor.spec.ts b/lib/modules/versioning/hashicorp/convertor.spec.ts index 943fe457e8df8e2a93df9c64c8a94a5d486c10ad..54a6b24727a69ee8972b828feeb7b046f2ed0fff 100644 --- a/lib/modules/versioning/hashicorp/convertor.spec.ts +++ b/lib/modules/versioning/hashicorp/convertor.spec.ts @@ -1,7 +1,7 @@ import { hashicorp2npm, npm2hashicorp } from './convertor'; describe('modules/versioning/hashicorp/convertor', () => { - test.each` + it.each` hashicorp | npm ${''} | ${''} ${'4.2.0'} | ${'4.2.0'} @@ -29,7 +29,7 @@ describe('modules/versioning/hashicorp/convertor', () => { ); // These are non-reflective cases for hashicorp2npm - test.each` + it.each` hashicorp | npm ${'~> 4'} | ${'>=4'} ${'~> v4'} | ${'>=4'} @@ -43,7 +43,7 @@ describe('modules/versioning/hashicorp/convertor', () => { }); // These are non-reflective cases for npm2hashicorp - test.each` + it.each` hashicorp | npm ${'~> 4.0'} | ${'^4'} ${'~> 4.0'} | ${'^4.0.0'} diff --git a/lib/modules/versioning/hashicorp/index.spec.ts b/lib/modules/versioning/hashicorp/index.spec.ts index f1eae889e34a98b4e004dd5966829b44e453ac09..03d77c4a477e48944ae098ca4136756cfd6ba532 100644 --- a/lib/modules/versioning/hashicorp/index.spec.ts +++ b/lib/modules/versioning/hashicorp/index.spec.ts @@ -1,7 +1,7 @@ import { api as semver } from '.'; describe('modules/versioning/hashicorp/index', () => { - test.each` + it.each` version | range | expected ${'4.2.0'} | ${'~> 4.0'} | ${true} ${'4.2.0'} | ${'~> 4.0.0'} | ${false} @@ -12,7 +12,7 @@ describe('modules/versioning/hashicorp/index', () => { } ); - test.each` + it.each` versions | range | expected ${['0.4.0', '0.5.0', '4.0.0', '4.2.0', '5.0.0']} | ${'~> 4.0'} | ${'4.2.0'} ${['0.4.0', '0.5.0', '4.0.0', '4.2.0', '5.0.0']} | ${'~> 4.0.0'} | ${'4.0.0'} @@ -23,7 +23,7 @@ describe('modules/versioning/hashicorp/index', () => { } ); - test.each` + it.each` input | expected ${'>= 1.0.0, <= 2.0.0'} | ${true} ${'~> 4'} | ${true} @@ -42,7 +42,7 @@ describe('modules/versioning/hashicorp/index', () => { expect(res).toBe(expected); }); - test.each` + it.each` version | range | expected ${'0.9.0'} | ${'>= 1.0.0, <= 2.0.0'} | ${true} ${'1.9.0'} | ${'>= 1.0.0, <= 2.0.0'} | ${false} @@ -53,7 +53,7 @@ describe('modules/versioning/hashicorp/index', () => { } ); - test.each` + it.each` versions | range | expected ${['0.4.0', '0.5.0', '4.2.0', '5.0.0']} | ${'~> 4.0'} | ${'4.2.0'} ${['0.4.0', '0.5.0', '4.2.0', '5.0.0']} | ${'~> 4.0.0'} | ${null} @@ -64,7 +64,7 @@ describe('modules/versioning/hashicorp/index', () => { } ); - test.each` + it.each` currentValue | rangeStrategy | currentVersion | newVersion | expected ${'~> 1.2'} | ${'replace'} | ${'1.2.3'} | ${'2.0.7'} | ${'~> 2.0'} ${'~> 1.2.0'} | ${'replace'} | ${'1.2.3'} | ${'2.0.7'} | ${'~> 2.0.0'} diff --git a/lib/modules/versioning/helm/index.spec.ts b/lib/modules/versioning/helm/index.spec.ts index 1ef08aa9b16cfe50b740e40ac037797165b56987..56bdd0b60ed352594d614c6071479550d075aa2c 100644 --- a/lib/modules/versioning/helm/index.spec.ts +++ b/lib/modules/versioning/helm/index.spec.ts @@ -1,7 +1,7 @@ import { api as semver } from '.'; describe('modules/versioning/helm/index', () => { - test.each` + it.each` version | isValid ${'17.04.0'} | ${false} ${'1.2.3'} | ${true} @@ -19,7 +19,7 @@ describe('modules/versioning/helm/index', () => { expect(res).toBe(isValid); }); - test.each` + it.each` version | isSingle ${'1.2.3'} | ${true} ${'1.2.3-alpha.1'} | ${true} @@ -31,7 +31,7 @@ describe('modules/versioning/helm/index', () => { expect(res).toBe(isSingle); }); - test.each` + it.each` currentValue | rangeStrategy | currentVersion | newVersion | expected ${'=1.0.0'} | ${'bump'} | ${'1.0.0'} | ${'1.1.0'} | ${'=1.1.0'} ${'^1.0'} | ${'bump'} | ${'1.0.0'} | ${'1.0.7'} | ${'^1.0.7'} diff --git a/lib/modules/versioning/hermit/index.spec.ts b/lib/modules/versioning/hermit/index.spec.ts index dee63ddc46a8885c0c46dc764cb8cba23e10ff20..d2bc903b41057f7ffa628cd9e05436d138fe58a6 100644 --- a/lib/modules/versioning/hermit/index.spec.ts +++ b/lib/modules/versioning/hermit/index.spec.ts @@ -3,7 +3,7 @@ import { HermitVersioning } from './index'; describe('modules/versioning/hermit/index', () => { const versioning = new HermitVersioning(); - test.each` + it.each` version | expected ${'1'} | ${true} ${'1.2'} | ${true} @@ -16,7 +16,7 @@ describe('modules/versioning/hermit/index', () => { expect(versioning.isStable(version)).toBe(expected); }); - test.each` + it.each` version | expected ${'1'} | ${true} ${'1rc1'} | ${true} @@ -43,7 +43,7 @@ describe('modules/versioning/hermit/index', () => { expect(versioning.isValid(version)).toBe(expected); }); - test.each` + it.each` version | major | minor | patch ${'17'} | ${17} | ${0} | ${0} ${'17.2'} | ${17} | ${2} | ${0} @@ -62,7 +62,7 @@ describe('modules/versioning/hermit/index', () => { } ); - test.each` + it.each` version | other | expected ${'1'} | ${'1.2'} | ${false} ${'@1'} | ${'@1.2'} | ${false} @@ -80,7 +80,7 @@ describe('modules/versioning/hermit/index', () => { } ); - test.each` + it.each` version | range | expected ${'0.6.1'} | ${'>0.6.0 <0.7.0'} | ${true} ${'0.6.1'} | ${'<0.7.0'} | ${true} @@ -107,7 +107,7 @@ describe('modules/versioning/hermit/index', () => { } ); - test.each` + it.each` version | other | expected ${'@1'} | ${'@1.2'} | ${true} ${'@1.2'} | ${'@1.2'} | ${false} @@ -136,7 +136,7 @@ describe('modules/versioning/hermit/index', () => { } ); - test.each` + it.each` version | other | expected ${'@1'} | ${'@1.2'} | ${false} ${'@1.2'} | ${'@1.2'} | ${false} diff --git a/lib/modules/versioning/hex/index.spec.ts b/lib/modules/versioning/hex/index.spec.ts index fe0995d165a7e12f024ea9cda92e78b7d91632e9..8a0b33b68dc7606a21f5fbb50af3cf372e7a4aa7 100644 --- a/lib/modules/versioning/hex/index.spec.ts +++ b/lib/modules/versioning/hex/index.spec.ts @@ -1,7 +1,7 @@ import { api as hexScheme } from '.'; describe('modules/versioning/hex/index', () => { - test.each` + it.each` version | range | expected ${'4.2.0'} | ${'~> 4.0'} | ${true} ${'2.1.0'} | ${'~> 2.0.0'} | ${false} @@ -16,7 +16,7 @@ describe('modules/versioning/hex/index', () => { } ); - test.each` + it.each` versions | range | expected ${['0.4.0', '0.5.0', '4.0.0', '4.2.0', '5.0.0']} | ${'~> 4.0'} | ${'4.2.0'} ${['0.4.0', '0.5.0', '4.0.0', '4.2.0', '5.0.0']} | ${'~> 4.0.0'} | ${'4.0.0'} @@ -27,7 +27,7 @@ describe('modules/versioning/hex/index', () => { } ); - test.each` + it.each` input | expected ${'>= 1.0.0 and <= 2.0.0'} | ${true} ${'>= 1.0.0 or <= 2.0.0'} | ${true} @@ -38,7 +38,7 @@ describe('modules/versioning/hex/index', () => { expect(res).toBe(expected); }); - test.each` + it.each` version | range | expected ${'0.1.0'} | ${'>= 1.0.0 and <= 2.0.0'} | ${true} ${'1.9.0'} | ${'>= 1.0.0 and <= 2.0.0'} | ${false} @@ -51,7 +51,7 @@ describe('modules/versioning/hex/index', () => { } ); - test.each` + it.each` versions | range | expected ${['0.4.0', '0.5.0', '4.2.0', '5.0.0']} | ${'~> 4.0'} | ${'4.2.0'} ${['0.4.0', '0.5.0', '4.2.0', '5.0.0']} | ${'~> 4.0.0'} | ${null} @@ -62,7 +62,7 @@ describe('modules/versioning/hex/index', () => { } ); - test.each` + it.each` currentValue | rangeStrategy | currentVersion | newVersion | expected ${'== 1.2.3'} | ${'pin'} | ${'1.2.3'} | ${'2.0.7'} | ${'== 2.0.7'} ${'== 3.6.1'} | ${'bump'} | ${'3.6.1'} | ${'3.6.2'} | ${'== 3.6.2'} diff --git a/lib/modules/versioning/ivy/index.spec.ts b/lib/modules/versioning/ivy/index.spec.ts index 82f3e2be4218ffa2bfa7b12dbf2790277fb09fcc..09dab16ffbe5e2eb0e753728834b4291405f1607 100644 --- a/lib/modules/versioning/ivy/index.spec.ts +++ b/lib/modules/versioning/ivy/index.spec.ts @@ -7,7 +7,7 @@ import { import ivy from '.'; describe('modules/versioning/ivy/index', () => { - test.each` + it.each` input | type | value ${'latest'} | ${REV_TYPE_LATEST} | ${''} ${'latest.release'} | ${REV_TYPE_LATEST} | ${'release'} @@ -30,7 +30,7 @@ describe('modules/versioning/ivy/index', () => { } ); - test.each` + it.each` input ${null} ${''} @@ -40,7 +40,7 @@ describe('modules/versioning/ivy/index', () => { expect(parseDynamicRevision(value)).toBeNull(); }); - test.each` + it.each` input | expected ${''} | ${false} ${'1.0.0'} | ${true} @@ -69,7 +69,7 @@ describe('modules/versioning/ivy/index', () => { expect(res).toBe(expected); }); - test.each` + it.each` input | expected ${''} | ${false} ${'1.0.0'} | ${true} @@ -97,7 +97,7 @@ describe('modules/versioning/ivy/index', () => { expect(ivy.isVersion(input)).toBe(expected); }); - test.each` + it.each` version | range | expected ${''} | ${'latest'} | ${false} ${'0'} | ${''} | ${false} @@ -140,7 +140,7 @@ describe('modules/versioning/ivy/index', () => { } ); - test.each` + it.each` currentValue | rangeStrategy | currentVersion | newVersion | expected ${'1'} | ${'auto'} | ${'1'} | ${'1.1'} | ${'1.1'} ${'[1.2.3,]'} | ${'auto'} | ${'1.2.3'} | ${'1.2.4'} | ${'[1.2.3,]'} @@ -170,7 +170,7 @@ describe('modules/versioning/ivy/index', () => { } ); - test.each` + it.each` versions | range | expected ${['0', '1', '2']} | ${'(,2)'} | ${'1'} `( @@ -180,14 +180,14 @@ describe('modules/versioning/ivy/index', () => { } ); - test.each` + it.each` version | expected ${'1.2.0'} | ${true} `('isCompatible("$version") === $expected', ({ version, expected }) => { expect(ivy.isCompatible(version)).toBe(expected); }); - test.each` + it.each` version | expected ${'1.2.0'} | ${true} ${'^1.2.0'} | ${false} diff --git a/lib/modules/versioning/kubernetes-api/index.spec.ts b/lib/modules/versioning/kubernetes-api/index.spec.ts index 82130abcb73607f90721914f7a9109de5cbb46e2..5f45041a1d440e76733ba06b3ee0183b8067ea80 100644 --- a/lib/modules/versioning/kubernetes-api/index.spec.ts +++ b/lib/modules/versioning/kubernetes-api/index.spec.ts @@ -3,7 +3,7 @@ import { KubernetesApiVersioningApi } from './index'; describe('modules/versioning/kubernetes-api/index', () => { const versioning = new KubernetesApiVersioningApi(); - test.each` + it.each` version | expected ${'v1'} | ${true} ${'v2'} | ${true} @@ -13,7 +13,7 @@ describe('modules/versioning/kubernetes-api/index', () => { expect(versioning.isStable(version)).toBe(expected); }); - test.each` + it.each` version | expected ${'v1'} | ${true} ${'v2'} | ${true} @@ -34,7 +34,7 @@ describe('modules/versioning/kubernetes-api/index', () => { expect(versioning.isValid(version)).toBe(expected); }); - test.each` + it.each` version | major | minor | patch ${'v1'} | ${1} | ${0} | ${0} ${'v2'} | ${2} | ${0} | ${0} @@ -51,7 +51,7 @@ describe('modules/versioning/kubernetes-api/index', () => { } ); - test.each` + it.each` version | other | expected ${'v1'} | ${'v1'} | ${true} ${'v1'} | ${'v2'} | ${false} @@ -78,7 +78,7 @@ describe('modules/versioning/kubernetes-api/index', () => { } ); - test.each` + it.each` version | other | expected ${'v1'} | ${'v1'} | ${true} ${'v1'} | ${'v2'} | ${false} @@ -97,7 +97,7 @@ describe('modules/versioning/kubernetes-api/index', () => { } ); - test.each` + it.each` version | other | expected ${'v1'} | ${'v2'} | ${false} ${'v1'} | ${'v1alpha1'} | ${true} diff --git a/lib/modules/versioning/loose/index.spec.ts b/lib/modules/versioning/loose/index.spec.ts index 86bf485962f494f1b7bf59150c750a0ad375a8bd..aca5c130966111cede214f0bb1d0ea45985584ed 100644 --- a/lib/modules/versioning/loose/index.spec.ts +++ b/lib/modules/versioning/loose/index.spec.ts @@ -1,7 +1,7 @@ import loose from '.'; describe('modules/versioning/loose/index', () => { - test.each` + it.each` version | expected ${'1.1'} | ${true} ${'1.3.RC2'} | ${true} @@ -10,7 +10,7 @@ describe('modules/versioning/loose/index', () => { expect(!!loose.isVersion(version)).toBe(expected); }); - test.each` + it.each` version | expected ${'v1.4'} | ${true} ${'3.5.0'} | ${true} @@ -37,7 +37,7 @@ describe('modules/versioning/loose/index', () => { expect(!!loose.isValid(version)).toBe(expected); }); - test.each` + it.each` a | b | expected ${'2.4'} | ${'2.4'} | ${true} ${'2.4.0'} | ${'2.4.0'} | ${true} @@ -48,7 +48,7 @@ describe('modules/versioning/loose/index', () => { expect(loose.equals(a, b)).toBe(expected); }); - test.each` + it.each` a | b | expected ${'2.4.0'} | ${'2.4'} | ${true} ${'2.4.2'} | ${'2.4.1'} | ${true} @@ -63,14 +63,14 @@ describe('modules/versioning/loose/index', () => { expect(loose.isGreaterThan(a, b)).toBe(expected); }); - test.each` + it.each` version | expected ${'1.2.0'} | ${true} `('isCompatible("$version") === $expected', ({ version, expected }) => { expect(loose.isCompatible(version)).toBe(expected); }); - test.each` + it.each` version | expected ${'1.2.0'} | ${true} ${'^1.2.0'} | ${false} diff --git a/lib/modules/versioning/maven/compare.spec.ts b/lib/modules/versioning/maven/compare.spec.ts index 61bcc1aaed34c2b2351d5d97583a4e75cac13d90..64d545ad87a976d1430192ac7f0380bf8345e156 100644 --- a/lib/modules/versioning/maven/compare.spec.ts +++ b/lib/modules/versioning/maven/compare.spec.ts @@ -10,7 +10,7 @@ describe('modules/versioning/maven/compare', () => { // @see https://github.com/apache/maven/blob/master/maven-artifact/src/test/java/org/apache/maven/artifact/versioning/ComparableVersionTest.java // @see https://github.com/apache/maven/blob/master/maven-artifact/src/test/java/org/apache/maven/artifact/versioning/DefaultArtifactVersionTest.java describe('equality', () => { - test.each` + it.each` x | y ${'1'} | ${'1'} ${'1'} | ${'1.0'} @@ -99,7 +99,7 @@ describe('modules/versioning/maven/compare', () => { }); describe('ordering', () => { - test.each` + it.each` x | y ${'1'} | ${'2'} ${'1.5'} | ${'2'} @@ -197,7 +197,7 @@ describe('modules/versioning/maven/compare', () => { describe('Non-standard behavior', () => { describe('equality', () => { - test.each` + it.each` x | y ${'1-ga-1'} | ${'1-1'} ${'1.0-SNAP'} | ${'1-snapshot'} @@ -212,7 +212,7 @@ describe('modules/versioning/maven/compare', () => { }); describe('ordering', () => { - test.each` + it.each` x | y ${'1-snap'} | ${'1'} ${'1-preview'} | ${'1-snapshot'} @@ -224,7 +224,7 @@ describe('modules/versioning/maven/compare', () => { }); describe('Ranges', () => { - test.each` + it.each` input ${'1.2.3-SNAPSHOT'} ${'[]'} @@ -255,7 +255,7 @@ describe('modules/versioning/maven/compare', () => { expect(rangeToStr(range)).toBeNull(); }); - test.each` + it.each` input | leftType | leftValue | leftBracket | rightType | rightValue | rightBracket ${'[1.0]'} | ${'INCLUDING_POINT'} | ${'1.0'} | ${'['} | ${'INCLUDING_POINT'} | ${'1.0'} | ${']'} ${'(,1.0]'} | ${'EXCLUDING_POINT'} | ${null} | ${'('} | ${'INCLUDING_POINT'} | ${'1.0'} | ${']'} @@ -294,7 +294,7 @@ describe('modules/versioning/maven/compare', () => { } ); - test.each` + it.each` range | version | expected ${'[1.2.3]'} | ${'1.2.3'} | ${'[1.2.3]'} ${'[1.2.3]'} | ${'1.2.4'} | ${'[1.2.4]'} diff --git a/lib/modules/versioning/maven/index.spec.ts b/lib/modules/versioning/maven/index.spec.ts index d52110c92440a3e1d0836a1a0ce7602b6784afde..e0e012bbe3ba57577f805b284fc757fd4b036eed 100644 --- a/lib/modules/versioning/maven/index.spec.ts +++ b/lib/modules/versioning/maven/index.spec.ts @@ -8,7 +8,7 @@ describe('modules/versioning/maven/index', () => { expect(isValid).toBe(_isValid); }); - test.each` + it.each` version | expected ${'1.0.0'} | ${true} ${'17.0.5+8'} | ${true} @@ -18,7 +18,7 @@ describe('modules/versioning/maven/index', () => { expect(!!isValid(version)).toBe(expected); }); - test.each` + it.each` version | expected ${''} | ${false} ${'1.0.0'} | ${true} @@ -46,7 +46,7 @@ describe('modules/versioning/maven/index', () => { expect(!!isVersion(version)).toBe(expected); }); - test.each` + it.each` version | expected ${''} | ${false} ${'foobar'} | ${true} @@ -75,7 +75,7 @@ describe('modules/versioning/maven/index', () => { expect(res).toBe(expected); }); - test.each` + it.each` input | major | minor | patch ${''} | ${null} | ${null} | ${null} ${'1'} | ${1} | ${0} | ${0} @@ -97,7 +97,7 @@ describe('modules/versioning/maven/index', () => { } ); - test.each` + it.each` version | range | expected ${'0'} | ${'[0,1]'} | ${true} ${'1'} | ${'[0,1]'} | ${true} @@ -125,14 +125,14 @@ describe('modules/versioning/maven/index', () => { } ); - test.each` + it.each` a | b | expected ${'1.1'} | ${'1'} | ${true} `('isGreaterThan("$a", "$b") === $expected', ({ a, b, expected }) => { expect(maven.isGreaterThan(a, b)).toBe(expected); }); - test.each` + it.each` versions | range | expected ${['1']} | ${'1'} | ${'1'} `( @@ -142,7 +142,7 @@ describe('modules/versioning/maven/index', () => { } ); - test.each` + it.each` versions | range | expected ${['1']} | ${'1'} | ${'1'} `( @@ -152,7 +152,7 @@ describe('modules/versioning/maven/index', () => { } ); - test.each` + it.each` currentValue | rangeStrategy | currentVersion | newVersion | expected ${'1'} | ${null} | ${null} | ${'1.1'} | ${'1.1'} ${'[1.2.3,]'} | ${null} | ${null} | ${'1.2.4'} | ${'[1.2.3,]'} diff --git a/lib/modules/versioning/nixpkgs/index.spec.ts b/lib/modules/versioning/nixpkgs/index.spec.ts index c22e106982e390ef791ac3b75f4ce37963fb3119..965cf8c8d49ebc313fde27872577ab0776965a45 100644 --- a/lib/modules/versioning/nixpkgs/index.spec.ts +++ b/lib/modules/versioning/nixpkgs/index.spec.ts @@ -3,7 +3,7 @@ import { NixPkgsVersioning } from '.'; describe('modules/versioning/nixpkgs/index', () => { const versioning = new NixPkgsVersioning(); - test.each` + it.each` version | expected ${undefined} | ${false} ${null} | ${false} @@ -29,7 +29,7 @@ describe('modules/versioning/nixpkgs/index', () => { expect(versioning.isValid(version)).toBe(expected); }); - test.each` + it.each` version | expected ${undefined} | ${false} ${null} | ${false} @@ -46,7 +46,7 @@ describe('modules/versioning/nixpkgs/index', () => { expect(versioning.isStable(version)).toBe(expected); }); - test.each` + it.each` a | b | expected ${'nixos-22.05'} | ${'nixos-22.05'} | ${true} ${'nixos-22.05'} | ${'nixos-21.11'} | ${false} @@ -57,7 +57,7 @@ describe('modules/versioning/nixpkgs/index', () => { expect(versioning.equals(a, b)).toBe(expected); }); - test.each` + it.each` versions | expected ${['nixos-21.11', 'nixos-22.05', 'nixos-22.05-small', 'nixos-unstable', 'nixos-unstable-small']} | ${['nixos-21.11', 'nixos-22.05', 'nixos-22.05-small', 'nixos-unstable', 'nixos-unstable-small']} `( @@ -69,7 +69,7 @@ describe('modules/versioning/nixpkgs/index', () => { } ); - test.each` + it.each` a | b | expected ${'nixos-22.05'} | ${'nixos-22.05'} | ${true} ${'nixos-22.05'} | ${'nixpkgs-22.05'} | ${false} diff --git a/lib/modules/versioning/node/index.spec.ts b/lib/modules/versioning/node/index.spec.ts index 45572bf1c256f53399864cee7f1b1ad76621d27c..74507fa9544ce8c6a3edea636b74f2bb6f2e76c3 100644 --- a/lib/modules/versioning/node/index.spec.ts +++ b/lib/modules/versioning/node/index.spec.ts @@ -12,7 +12,7 @@ describe('modules/versioning/node/index', () => { DateTime.local = dtLocal; }); - test.each` + it.each` currentValue | rangeStrategy | currentVersion | newVersion | expected ${'1.0.0'} | ${'replace'} | ${'1.0.0'} | ${'v1.1.0'} | ${'1.1.0'} ${'~8.0.0'} | ${'replace'} | ${'8.0.2'} | ${'v8.2.0'} | ${'~8.2.0'} @@ -37,7 +37,7 @@ describe('modules/versioning/node/index', () => { const t1 = DateTime.fromISO('2020-09-01'); const t2 = DateTime.fromISO('2021-06-01'); - test.each` + it.each` version | time | expected ${'16.0.0'} | ${t1} | ${false} ${'15.0.0'} | ${t1} | ${false} @@ -58,7 +58,7 @@ describe('modules/versioning/node/index', () => { expect(nodever.isStable(version as string)).toBe(expected); }); - test.each` + it.each` version | expected ${'16.0.0'} | ${true} ${'erbium'} | ${true} @@ -70,7 +70,7 @@ describe('modules/versioning/node/index', () => { expect(nodever.isValid(version as string)).toBe(expected); }); - test.each` + it.each` version | range | expected ${'16.0.0'} | ${'gallium'} | ${true} ${'16.0.0'} | ${'fermium'} | ${false} @@ -83,7 +83,7 @@ describe('modules/versioning/node/index', () => { } ); - test.each` + it.each` versions | range | expected ${['16.0.0']} | ${'gallium'} | ${'16.0.0'} ${['16.0.0', '14.0.0', '16.9.9']} | ${'gallium'} | ${'16.9.9'} @@ -97,7 +97,7 @@ describe('modules/versioning/node/index', () => { } ); - test.each` + it.each` versions | range | expected ${['16.0.0']} | ${'gallium'} | ${'16.0.0'} ${['16.0.0', '14.0.0', '16.9.9']} | ${'gallium'} | ${'16.0.0'} diff --git a/lib/modules/versioning/npm/index.spec.ts b/lib/modules/versioning/npm/index.spec.ts index d67a02b1b4ba348c2e7cfe829a3228b24efe09e2..2441b4d71c95a956684db6b1bb63ffcb865c8e3a 100644 --- a/lib/modules/versioning/npm/index.spec.ts +++ b/lib/modules/versioning/npm/index.spec.ts @@ -1,7 +1,7 @@ import { api as semver } from '.'; describe('modules/versioning/npm/index', () => { - test.each` + it.each` version | isValid ${'17.04.0'} | ${false} ${'1.2.3'} | ${true} @@ -27,7 +27,7 @@ describe('modules/versioning/npm/index', () => { expect(res).toBe(isValid); }); - test.each` + it.each` versions | range | maxSatisfying ${['2.3.3.', '2.3.4', '2.4.5', '2.5.1', '3.0.0']} | ${'*'} | ${'3.0.0'} ${['2.3.3.', '2.3.4', '2.4.5', '2.5.1', '3.0.0']} | ${'x'} | ${'3.0.0'} @@ -43,7 +43,7 @@ describe('modules/versioning/npm/index', () => { } ); - test.each` + it.each` version | isSingle ${'1.2.3'} | ${true} ${'1.2.3-alpha.1'} | ${true} @@ -55,7 +55,7 @@ describe('modules/versioning/npm/index', () => { expect(res).toBe(isSingle); }); - test.each` + it.each` a | b | expected ${'1.0.0'} | ${'1.0.0'} | ${true} ${'1.0.0'} | ${'>=1.0.0'} | ${true} @@ -75,7 +75,7 @@ describe('modules/versioning/npm/index', () => { expect(semver.subset!(a, b)).toBe(expected); }); - test.each` + it.each` currentValue | rangeStrategy | currentVersion | newVersion | expected ${'=1.0.0'} | ${'bump'} | ${'1.0.0'} | ${'1.1.0'} | ${'=1.1.0'} ${'^1.0'} | ${'bump'} | ${'1.0.0'} | ${'1.0.7'} | ${'^1.0.7'} diff --git a/lib/modules/versioning/nuget/index.spec.ts b/lib/modules/versioning/nuget/index.spec.ts index 79d3dd9a20c846cd6f552e962731bd42d6573fd4..f2156c442f6ef72547c28a3f770f41df18254152 100644 --- a/lib/modules/versioning/nuget/index.spec.ts +++ b/lib/modules/versioning/nuget/index.spec.ts @@ -1,7 +1,7 @@ import nuget from '.'; describe('modules/versioning/nuget/index', () => { - test.each` + it.each` input | expected ${'9.0.3'} | ${true} ${'1.2019.3.22'} | ${true} @@ -17,7 +17,7 @@ describe('modules/versioning/nuget/index', () => { expect(res).toBe(expected); }); - test.each` + it.each` input | expected ${'9.0.3'} | ${true} ${'1.2019.3.22'} | ${true} @@ -33,7 +33,7 @@ describe('modules/versioning/nuget/index', () => { expect(res).toBe(expected); }); - test.each` + it.each` input | expected ${'9.0.3'} | ${true} ${'1.2019.3.22'} | ${true} @@ -45,7 +45,7 @@ describe('modules/versioning/nuget/index', () => { expect(nuget.isStable(input)).toBe(expected); }); - test.each` + it.each` a | b | expected ${'17.4'} | ${'17.04'} | ${true} ${'1.4'} | ${'1.4.0'} | ${true} @@ -55,7 +55,7 @@ describe('modules/versioning/nuget/index', () => { expect(nuget.equals(a, b)).toBe(expected); }); - test.each` + it.each` a | b | expected ${'2.4.2'} | ${'2.4.1'} | ${true} ${'2.4-beta'} | ${'2.4-alpha'} | ${true} diff --git a/lib/modules/versioning/pep440/index.spec.ts b/lib/modules/versioning/pep440/index.spec.ts index 09db07eef1d56f564c4f8efe27d2e555d70aa0a7..4a404d7378a82dde9d3a946f6713ea13cd1d7bdd 100644 --- a/lib/modules/versioning/pep440/index.spec.ts +++ b/lib/modules/versioning/pep440/index.spec.ts @@ -1,7 +1,7 @@ import pep440 from '.'; describe('modules/versioning/pep440/index', () => { - test.each` + it.each` input | expected ${'0.750'} | ${true} ${'1.2.3'} | ${true} @@ -20,7 +20,7 @@ describe('modules/versioning/pep440/index', () => { expect(res).toBe(expected); }); - test.each` + it.each` input | expected ${'1.2.3'} | ${true} ${'1.2.3rc0'} | ${false} @@ -29,7 +29,7 @@ describe('modules/versioning/pep440/index', () => { expect(pep440.isStable(input)).toBe(expected); }); - test.each` + it.each` a | b | expected ${'1.0'} | ${'1.0.0'} | ${true} ${'1.0.0'} | ${'1.0..foo'} | ${false} @@ -37,7 +37,7 @@ describe('modules/versioning/pep440/index', () => { expect(pep440.equals(a, b)).toBe(expected); }); - test.each` + it.each` version | isSingle ${'1.2.3'} | ${true} ${'1.2.3rc0'} | ${true} @@ -61,7 +61,7 @@ describe('modules/versioning/pep440/index', () => { '2.0.3', ]; - test.each` + it.each` range | expected ${'~=1.2.1'} | ${'1.2.3'} ${'~=2.1'} | ${null} @@ -72,7 +72,7 @@ describe('modules/versioning/pep440/index', () => { } ); - test.each` + it.each` range | expected ${'~=1.2.1'} | ${'1.2.1'} ${'~=2.1'} | ${null} @@ -83,7 +83,7 @@ describe('modules/versioning/pep440/index', () => { } ); - test.each` + it.each` currentValue | rangeStrategy | currentVersion | newVersion | expected ${'1.0.0'} | ${'bump'} | ${'1.0.0'} | ${'1.2.3'} | ${'1.2.3'} ${'1.0.0'} | ${'replace'} | ${'1.0.0'} | ${'1.2.3'} | ${'1.2.3'} @@ -192,7 +192,7 @@ describe('modules/versioning/pep440/index', () => { } ); - test.each` + it.each` currentValue | rangeStrategy | currentVersion | newVersion | expected ${'1.0.0'} | ${'bump'} | ${'1.0.0'} | ${'1.2.3'} | ${'1.2.3'} ${'1.0.0'} | ${'replace'} | ${'1.0.0'} | ${'1.2.3'} | ${'1.2.3'} @@ -309,7 +309,7 @@ describe('modules/versioning/pep440/index', () => { } ); - test.each` + it.each` version | range | expected ${'0.9.9.9'} | ${'>= 1.0.0, < 2.0.0'} | ${true} ${'1.0.0a0'} | ${'>= 1.0.0, < 2.0.0'} | ${true} diff --git a/lib/modules/versioning/pep440/range.spec.ts b/lib/modules/versioning/pep440/range.spec.ts index 96b587f1d6a67be22b6b23105cc057e641b3106c..75c69a681d4c005dd629ffcfbdb27d6f44d99296 100644 --- a/lib/modules/versioning/pep440/range.spec.ts +++ b/lib/modules/versioning/pep440/range.spec.ts @@ -1,6 +1,6 @@ import { checkRangeAndRemoveUnnecessaryRangeLimit } from './range'; -test.each` +it.each` rangeInput | newVersion | expected ${'==4.1.*,>=3.2.2'} | ${'4.1.1'} | ${'==4.1.*'} ${'==4.0.*,>=3.2.2'} | ${'4.0.0'} | ${'==4.0.*'} diff --git a/lib/modules/versioning/perl/index.spec.ts b/lib/modules/versioning/perl/index.spec.ts index 87577df997aa1ffe42396d989947c858b075925e..7a4fef974cbbd5938f9a2aa1d5aafdab2569ff9f 100644 --- a/lib/modules/versioning/perl/index.spec.ts +++ b/lib/modules/versioning/perl/index.spec.ts @@ -1,7 +1,7 @@ import perl from '.'; describe('modules/versioning/perl/index', () => { - test.each` + it.each` input | expected ${'1'} | ${true} ${'1.2'} | ${true} @@ -28,7 +28,7 @@ describe('modules/versioning/perl/index', () => { expect(res).toBe(expected); }); - test.each` + it.each` input | expected ${'1'} | ${true} ${'1.234'} | ${true} @@ -41,7 +41,7 @@ describe('modules/versioning/perl/index', () => { expect(perl.isStable(input)).toBe(expected); }); - test.each` + it.each` a | b | expected ${'1.2'} | ${'v1.200.0'} | ${true} ${'1.02'} | ${'v1.20.0'} | ${true} @@ -55,7 +55,7 @@ describe('modules/versioning/perl/index', () => { expect(perl.equals(a, b)).toBe(expected); }); - test.each` + it.each` a | b | expected ${'2.4.2'} | ${'2.4.1'} | ${true} ${'0.1301'} | ${'0.13_01'} | ${true} diff --git a/lib/modules/versioning/poetry/index.spec.ts b/lib/modules/versioning/poetry/index.spec.ts index a5323ada04410f0bc6c4ba9665e88a4258224d42..3d3618e3153d3dfe3271e79c9bd403f4a2440f64 100644 --- a/lib/modules/versioning/poetry/index.spec.ts +++ b/lib/modules/versioning/poetry/index.spec.ts @@ -2,7 +2,7 @@ import { api as versioning } from '.'; describe('modules/versioning/poetry/index', () => { describe('equals', () => { - test.each` + it.each` a | b | expected ${'1'} | ${'1'} | ${true} ${'1.0'} | ${'1'} | ${true} @@ -21,7 +21,7 @@ describe('modules/versioning/poetry/index', () => { }); }); - test.each` + it.each` version | major | minor | patch ${'1'} | ${1} | ${0} | ${0} ${'1.9'} | ${1} | ${9} | ${0} @@ -40,7 +40,7 @@ describe('modules/versioning/poetry/index', () => { } ); - test.each` + it.each` a | b | expected ${'2'} | ${'1'} | ${true} ${'2.0'} | ${'1'} | ${true} @@ -56,7 +56,7 @@ describe('modules/versioning/poetry/index', () => { expect(versioning.isGreaterThan(a, b)).toBe(expected); }); - test.each` + it.each` version | expected ${'1'} | ${true} ${'1.9'} | ${true} @@ -69,7 +69,7 @@ describe('modules/versioning/poetry/index', () => { expect(res).toBe(expected); }); - test.each` + it.each` version | expected ${'1.2.3a0'} | ${true} ${'1.2.3b1'} | ${true} @@ -81,7 +81,7 @@ describe('modules/versioning/poetry/index', () => { expect(!!versioning.isVersion(version)).toBe(expected); }); - test.each` + it.each` version | expected ${'17.04.00'} | ${true} ${'17.b4.0'} | ${false} @@ -105,7 +105,7 @@ describe('modules/versioning/poetry/index', () => { expect(!!versioning.isValid(version)).toBe(expected); }); - test.each` + it.each` version | expected ${'1.2.3'} | ${true} ${'1.2.3-alpha.1'} | ${true} @@ -116,7 +116,7 @@ describe('modules/versioning/poetry/index', () => { expect(!!versioning.isSingleVersion(version)).toBe(expected); }); - test.each` + it.each` version | range | expected ${'4.2.0'} | ${'4.2, >= 3.0, < 5.0.0'} | ${true} ${'4.2.0'} | ${'2.0, >= 3.0, < 5.0.0'} | ${false} @@ -138,7 +138,7 @@ describe('modules/versioning/poetry/index', () => { } ); - test.each` + it.each` version | range | expected ${'0.9.0'} | ${'>= 1.0.0 <= 2.0.0'} | ${true} ${'1.9.0'} | ${'>= 1.0.0 <= 2.0.0'} | ${false} @@ -149,7 +149,7 @@ describe('modules/versioning/poetry/index', () => { } ); - test.each` + it.each` versions | range | expected ${['0.4.0', '0.5.0', '4.2.0', '4.3.0', '5.0.0']} | ${'4.*, > 4.2'} | ${'4.3.0'} ${['0.4.0', '0.5.0', '4.2.0', '5.0.0']} | ${'^4.0.0'} | ${'4.2.0'} @@ -165,7 +165,7 @@ describe('modules/versioning/poetry/index', () => { } ); - test.each` + it.each` versions | range | expected ${['4.2.1', '0.4.0', '0.5.0', '4.0.0', '4.2.0', '5.0.0']} | ${'4.*.0, < 4.2.5'} | ${'4.2.1'} ${['0.4.0', '0.5.0', '4.0.0', '4.2.0', '5.0.0', '5.0.3']} | ${'5.0, > 5.0.0'} | ${'5.0.3'} @@ -178,7 +178,7 @@ describe('modules/versioning/poetry/index', () => { } ); - test.each` + it.each` currentValue | rangeStrategy | currentVersion | newVersion | expected ${'1.0.0'} | ${'bump'} | ${'1.0.0'} | ${'1.1.0'} | ${'1.1.0'} ${' 1.0.0'} | ${'bump'} | ${'1.0.0'} | ${'1.1.0'} | ${'1.1.0'} @@ -241,7 +241,7 @@ describe('modules/versioning/poetry/index', () => { } ); - test.each` + it.each` a | b | expected ${'2'} | ${'1'} | ${1} ${'2.0'} | ${'1'} | ${1} @@ -259,7 +259,7 @@ describe('modules/versioning/poetry/index', () => { }); }); -test.each` +it.each` a | b | expected ${'1.0.0'} | ${'1.0.0'} | ${true} ${'1.0.0'} | ${'>=1.0.0'} | ${true} diff --git a/lib/modules/versioning/python/index.spec.ts b/lib/modules/versioning/python/index.spec.ts index 710e5ff18fa1a4f94413ad29347ba739866544c6..f362c9056ef9f81bb1f13ae28db7cc4d50954c7f 100644 --- a/lib/modules/versioning/python/index.spec.ts +++ b/lib/modules/versioning/python/index.spec.ts @@ -3,7 +3,7 @@ import type { NewValueConfig } from '../types'; import { api as versioning } from '.'; describe('modules/versioning/python/index', () => { - test.each` + it.each` version | expected ${'17.04.00'} | ${true} ${'17.b4.0'} | ${false} @@ -27,7 +27,7 @@ describe('modules/versioning/python/index', () => { expect(!!versioning.isValid(version)).toBe(expected); }); - test.each` + it.each` version | range | expected ${'4.2.0'} | ${'4.2, >= 3.0, < 5.0.0'} | ${true} ${'4.2.0'} | ${'2.0, >= 3.0, < 5.0.0'} | ${false} @@ -53,7 +53,7 @@ describe('modules/versioning/python/index', () => { } ); - test.each` + it.each` version | range | expected ${'0.9.0'} | ${'>= 1.0.0 <= 2.0.0'} | ${true} ${'1.9.0'} | ${'>= 1.0.0 <= 2.0.0'} | ${false} @@ -65,7 +65,7 @@ describe('modules/versioning/python/index', () => { } ); - test.each` + it.each` versions | range | expected ${['0.4.0', '0.5.0', '4.2.0', '4.3.0', '5.0.0']} | ${'4.*, > 4.2'} | ${'4.3.0'} ${['0.4.0', '0.5.0', '4.2.0', '5.0.0']} | ${'^4.0.0'} | ${'4.2.0'} @@ -82,7 +82,7 @@ describe('modules/versioning/python/index', () => { } ); - test.each` + it.each` versions | range | expected ${['4.2.1', '0.4.0', '0.5.0', '4.0.0', '4.2.0', '5.0.0']} | ${'4.*.0, < 4.2.5'} | ${'4.2.1'} ${['0.4.0', '0.5.0', '4.0.0', '4.2.0', '5.0.0', '5.0.3']} | ${'5.0, > 5.0.0'} | ${'5.0.3'} @@ -101,7 +101,7 @@ describe('modules/versioning/python/index', () => { }); }); -test.each` +it.each` a | b | expected ${'1.0.0'} | ${'1.0.0'} | ${true} ${'1.0.0'} | ${'>=1.0.0'} | ${true} diff --git a/lib/modules/versioning/redhat/index.spec.ts b/lib/modules/versioning/redhat/index.spec.ts index 83f60f9b36058da9b79e68ff9b6257f8744d74bb..a4793884c390c187a79b7cd65794340755202784 100644 --- a/lib/modules/versioning/redhat/index.spec.ts +++ b/lib/modules/versioning/redhat/index.spec.ts @@ -1,7 +1,7 @@ import redhat from '.'; describe('modules/versioning/redhat/index', () => { - test.each` + it.each` input | expected ${'1'} | ${true} ${'17.04'} | ${true} @@ -25,7 +25,7 @@ describe('modules/versioning/redhat/index', () => { expect(redhat.isValid(input)).toBe(expected); }); - test.each` + it.each` a | b | expected ${'3-57'} | ${'3-2'} | ${true} ${'8.6'} | ${'8.4'} | ${true} diff --git a/lib/modules/versioning/regex/index.spec.ts b/lib/modules/versioning/regex/index.spec.ts index e9070d7de7fc1c044d24c1482006011189e22ff6..a97494482a15c87b59bb2ed1a63a34bec81f515e 100644 --- a/lib/modules/versioning/regex/index.spec.ts +++ b/lib/modules/versioning/regex/index.spec.ts @@ -33,7 +33,7 @@ describe('modules/versioning/regex/index', () => { } }); - test.each` + it.each` version | expected ${'1'} | ${false} ${'aardvark'} | ${false} @@ -56,7 +56,7 @@ describe('modules/versioning/regex/index', () => { expect(regex.isValid(version)).toBe(expected); }); - test.each` + it.each` version | range | expected ${'1.2.3'} | ${'2.3.4'} | ${true} ${'1.2.3a1'} | ${'2.3.4'} | ${true} @@ -81,7 +81,7 @@ describe('modules/versioning/regex/index', () => { } ); - test.each` + it.each` version | expected ${'1.2.3'} | ${true} ${'1.2.3a1'} | ${true} @@ -102,7 +102,7 @@ describe('modules/versioning/regex/index', () => { expect(res).toBe(expected); }); - test.each` + it.each` version | expected ${'1.2.3'} | ${true} ${'1.2.3-foo'} | ${true} @@ -113,7 +113,7 @@ describe('modules/versioning/regex/index', () => { expect(res).toBe(expected); }); - test.each` + it.each` version | expected ${'1.2.3'} | ${true} ${'1.2.3a1'} | ${true} @@ -133,7 +133,7 @@ describe('modules/versioning/regex/index', () => { expect(!!regex.isVersion(version)).toBe(expected); }); - test.each` + it.each` version | major | minor | patch ${'1.2.3'} | ${1} | ${2} | ${3} ${'1.2.3a1'} | ${1} | ${2} | ${3} @@ -147,7 +147,7 @@ describe('modules/versioning/regex/index', () => { } ); - test.each` + it.each` a | b | expected ${'1.2.3'} | ${'1.2.3'} | ${true} ${'1.2.3a1'} | ${'1.2.3a1'} | ${true} @@ -169,7 +169,7 @@ describe('modules/versioning/regex/index', () => { expect(regex.equals(a, b)).toBe(expected); }); - test.each` + it.each` a | b | expected ${'2.0.0'} | ${'1.0.0'} | ${true} ${'2.2.0'} | ${'2.1.0'} | ${true} @@ -202,7 +202,7 @@ describe('modules/versioning/regex/index', () => { expect(regex.isGreaterThan(a, b)).toBe(expected); }); - test.each` + it.each` version | range | expected ${'1.2.2'} | ${'1.2.3'} | ${true} ${'1.2.2'} | ${'1.2.3-bar'} | ${true} @@ -251,7 +251,7 @@ describe('modules/versioning/regex/index', () => { } ); - test.each` + it.each` versions | range | expected ${['2.1.5', '2.1.6a1', '2.1.6', '2.1.6-foo']} | ${'2.1.6'} | ${'2.1.6'} ${['2.1.5', '2.1.6a1', '2.1.6', '2.1.6-foo']} | ${'2.1.6-foo'} | ${'2.1.6'} @@ -265,7 +265,7 @@ describe('modules/versioning/regex/index', () => { } ); - test.each` + it.each` versions | range | expected ${['2.1.5', '2.1.6a1', '2.1.6', '2.1.6-foo']} | ${'2.1.6'} | ${'2.1.6'} ${['2.1.5', '2.1.6a1', '2.1.6', '2.1.6-foo']} | ${'2.1.6-foo'} | ${'2.1.6'} @@ -302,7 +302,7 @@ describe('modules/versioning/regex/index', () => { }); }); - test.each` + it.each` version | range | expected ${'1.2.2'} | ${'1.2.2'} | ${true} ${'1.2.2'} | ${'1.2.2-bar'} | ${true} @@ -357,7 +357,7 @@ describe('modules/versioning/regex/index', () => { 'regex:^(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)(:?-(?<compatibility>.+)(?<build>\\d+)-r(?<revision>\\d+))?$' ); - test.each` + it.each` version | expected ${'12.7.0-debian-10-r69'} | ${true} ${'12.7.0-debian-10-r100'} | ${true} @@ -365,7 +365,7 @@ describe('modules/versioning/regex/index', () => { expect(!!re.isValid(version)).toBe(expected); }); - test.each` + it.each` version | range | expected ${'12.7.0-debian-10-r69'} | ${'12.7.0-debian-10-r100'} | ${true} `( @@ -376,7 +376,7 @@ describe('modules/versioning/regex/index', () => { } ); - test.each` + it.each` a | b | expected ${'12.7.0-debian-10-r69'} | ${'12.7.0-debian-10-r100'} | ${false} ${'12.7.0-debian-10-r169'} | ${'12.7.0-debian-10-r100'} | ${true} @@ -384,7 +384,7 @@ describe('modules/versioning/regex/index', () => { expect(re.isGreaterThan(a, b)).toBe(expected); }); - test.each` + it.each` version | range | expected ${'12.7.0-debian-9-r69'} | ${'12.7.0-debian-10-r69'} | ${true} ${'12.7.0-debian-9-r69'} | ${'12.7.0-debian-10-r68'} | ${true} diff --git a/lib/modules/versioning/rez/index.spec.ts b/lib/modules/versioning/rez/index.spec.ts index 89f6254bc03bcde0ea5279ae49602e7c05cbf7a7..c076cf3fcce9fdaedaba74d7e14dceeb79726c01 100644 --- a/lib/modules/versioning/rez/index.spec.ts +++ b/lib/modules/versioning/rez/index.spec.ts @@ -2,7 +2,7 @@ import semver from '../semver'; import { api as versioning } from '.'; describe('modules/versioning/rez/index', () => { - test.each` + it.each` version | equal | expected ${'1'} | ${'1'} | ${true} ${'1.0'} | ${'1'} | ${true} @@ -18,7 +18,7 @@ describe('modules/versioning/rez/index', () => { } ); - test.each` + it.each` version | expected ${'1'} | ${1} ${'1.9'} | ${1} @@ -27,7 +27,7 @@ describe('modules/versioning/rez/index', () => { expect(versioning.getMajor(version)).toEqual(expected); }); - test.each` + it.each` version | expected ${'1'} | ${0} ${'1.9'} | ${9} @@ -36,7 +36,7 @@ describe('modules/versioning/rez/index', () => { expect(versioning.getMinor(version)).toEqual(expected); }); - test.each` + it.each` version | expected ${'1'} | ${0} ${'1.9'} | ${0} @@ -46,7 +46,7 @@ describe('modules/versioning/rez/index', () => { expect(versioning.getPatch(version)).toEqual(expected); }); - test.each` + it.each` version | other | expected ${'2'} | ${'1'} | ${true} ${'2.0'} | ${'1'} | ${true} @@ -64,7 +64,7 @@ describe('modules/versioning/rez/index', () => { } ); - test.each` + it.each` version | expected ${'1'} | ${true} ${'1.9'} | ${true} @@ -75,7 +75,7 @@ describe('modules/versioning/rez/index', () => { expect(versioning.isStable(version)).toEqual(expected); }); - test.each` + it.each` input | expected ${'1.2.3..1.2.4'} | ${true} ${'1.2..1.3'} | ${true} @@ -97,7 +97,7 @@ describe('modules/versioning/rez/index', () => { expect(res).toBe(expected); }); - test.each` + it.each` input | expected ${'1.2.3'} | ${true} `('isVersion("$input") === $expected', ({ input, expected }) => { @@ -105,7 +105,7 @@ describe('modules/versioning/rez/index', () => { expect(res).toBe(expected); }); - test.each` + it.each` input | expected ${'1.2.3'} | ${true} ${'1.2.3-alpha.1'} | ${true} @@ -116,7 +116,7 @@ describe('modules/versioning/rez/index', () => { expect(res).toBe(expected); }); - test.each` + it.each` versions | range | expected ${['1.2.3', '1.2.4', '1.2.5']} | ${'1.2.3..1.2.4'} | ${'1.2.3'} ${['0.4.0', '0.5.0', '4.2.0', '5.0.0']} | ${'4'} | ${'4.2.0'} @@ -132,7 +132,7 @@ describe('modules/versioning/rez/index', () => { } ); - test.each` + it.each` versions | range | expected ${['1.2.3', '1.2.4', '1.2.5']} | ${'1.2.3..1.2.4'} | ${'1.2.3'} `( @@ -142,7 +142,7 @@ describe('modules/versioning/rez/index', () => { } ); - test.each` + it.each` version | range | expected ${'1.2.3'} | ${'1.2.3..1.2.4'} | ${false} ${'1.2.3'} | ${'1.2.4..1.2.5'} | ${true} @@ -155,7 +155,7 @@ describe('modules/versioning/rez/index', () => { } ); - test.each` + it.each` version | range | expected ${'1.2.3'} | ${'1.2.3..1.2.4'} | ${true} ${'1.2.4'} | ${'1.2.2..1.2.3'} | ${false} @@ -175,7 +175,7 @@ describe('modules/versioning/rez/index', () => { } ); - test.each` + it.each` a | b ${'1.1.1'} | ${'1.2.3'} ${'1.2.3'} | ${'1.3.4'} @@ -190,7 +190,7 @@ describe('modules/versioning/rez/index', () => { } ); - test.each` + it.each` currentValue | rangeStrategy | currentVersion | newVersion | expected ${'==1.2.3'} | ${'replace'} | ${'1.2.3'} | ${'1.2.4'} | ${'==1.2.4'} ${'1.2.3'} | ${'auto'} | ${'1.2.3'} | ${'1.2.4'} | ${'1.2.4'} @@ -440,7 +440,7 @@ describe('modules/versioning/rez/index', () => { } ); - test.each` + it.each` version | expected ${'1.2.0'} | ${true} `('isCompatible("$version") === $expected', ({ version, expected }) => { diff --git a/lib/modules/versioning/ruby/index.spec.ts b/lib/modules/versioning/ruby/index.spec.ts index f6862b00cef79edc5f81747b1c9cdde4b67dd9c2..6f9f9024521b1b7ac9c30441204f5b04b32bdfd0 100644 --- a/lib/modules/versioning/ruby/index.spec.ts +++ b/lib/modules/versioning/ruby/index.spec.ts @@ -1,7 +1,7 @@ import { api as semverRuby } from '.'; describe('modules/versioning/ruby/index', () => { - test.each` + it.each` a | b | expected ${'1.0.0'} | ${'1'} | ${true} ${'1.2.0'} | ${'1.2'} | ${true} @@ -15,7 +15,7 @@ describe('modules/versioning/ruby/index', () => { expect(semverRuby.equals(a, b)).toBe(expected); }); - test.each` + it.each` version | major | minor | patch ${'1'} | ${1} | ${null} | ${null} ${'1.2'} | ${1} | ${2} | ${null} @@ -30,7 +30,7 @@ describe('modules/versioning/ruby/index', () => { } ); - test.each` + it.each` version | expected ${'0'} | ${true} ${'v0'} | ${true} @@ -53,7 +53,7 @@ describe('modules/versioning/ruby/index', () => { expect(!!semverRuby.isVersion(version)).toBe(expected); }); - test.each` + it.each` a | b | expected ${'2'} | ${'1'} | ${true} ${'2.2'} | ${'2.1'} | ${true} @@ -92,7 +92,7 @@ describe('modules/versioning/ruby/index', () => { expect(semverRuby.isGreaterThan(a, b)).toBe(expected); }); - test.each` + it.each` version | expected ${'1'} | ${true} ${'1.2'} | ${true} @@ -110,14 +110,14 @@ describe('modules/versioning/ruby/index', () => { expect(res).toBe(expected); }); - test.each` + it.each` versions | expected ${['1.2.3-beta', '2.0.1', '1.3.4', '1.2.3']} | ${['1.2.3-beta', '1.2.3', '1.3.4', '2.0.1']} `('$versions -> sortVersions -> $expected ', ({ versions, expected }) => { expect(versions.sort(semverRuby.sortVersions)).toEqual(expected); }); - test.each` + it.each` versions | range | expected ${['2.1.5', '2.1.6']} | ${'~> 2.1'} | ${'2.1.5'} ${['2.1.6', '2.1.5']} | ${'~> 2.1.6'} | ${'2.1.6'} @@ -132,7 +132,7 @@ describe('modules/versioning/ruby/index', () => { } ); - test.each` + it.each` versions | range | expected ${['2.1.5', '2.1.6']} | ${'~> 2.1'} | ${'2.1.6'} ${['2.1.6', '2.1.5']} | ${'~> 2.1.6'} | ${'2.1.6'} @@ -147,7 +147,7 @@ describe('modules/versioning/ruby/index', () => { } ); - test.each` + it.each` version | range | expected ${'1.2'} | ${'>= 1.2'} | ${true} ${'1.2.3'} | ${'~> 1.2.1'} | ${true} @@ -164,7 +164,7 @@ describe('modules/versioning/ruby/index', () => { } ); - test.each` + it.each` version | range | expected ${'1.2.2'} | ${'< 1.2.2'} | ${true} ${'1.1.4'} | ${'>= 1.1.5, < 2.0'} | ${true} @@ -183,7 +183,7 @@ describe('modules/versioning/ruby/index', () => { } ); - test.each` + it.each` version | expected ${'1'} | ${true} ${'1.2'} | ${true} @@ -197,7 +197,7 @@ describe('modules/versioning/ruby/index', () => { expect(!!semverRuby.isValid(version)).toBe(expected); }); - test.each` + it.each` version | expected ${'1'} | ${true} ${'1.1'} | ${true} @@ -221,7 +221,7 @@ describe('modules/versioning/ruby/index', () => { expect(!!semverRuby.isValid(version)).toBe(expected); }); - test.each` + it.each` version | expected ${'1'} | ${true} ${'1.2'} | ${true} @@ -250,7 +250,7 @@ describe('modules/versioning/ruby/index', () => { expect(!!semverRuby.isSingleVersion(version)).toBe(expected); }); - test.each` + it.each` currentValue | rangeStrategy | currentVersion | newVersion | expected ${'1.0.3'} | ${'pin'} | ${'1.0.3'} | ${'1.2.3'} | ${'1.2.3'} ${'v1.0.3'} | ${'pin'} | ${'1.0.3'} | ${'1.2.3'} | ${'v1.2.3'} diff --git a/lib/modules/versioning/semver-coerced/index.spec.ts b/lib/modules/versioning/semver-coerced/index.spec.ts index e125cb9f5994afae2e07dbdcfc5152f5b6363fd2..95d1ddb87f64c00f03c873ac9d1f4933b2188036 100644 --- a/lib/modules/versioning/semver-coerced/index.spec.ts +++ b/lib/modules/versioning/semver-coerced/index.spec.ts @@ -49,7 +49,7 @@ describe('modules/versioning/semver-coerced/index', () => { }); describe('.getPatch(input)', () => { - test.each` + it.each` version | expected ${'1.0.2'} | ${2} ${'v3.1.2-foo'} | ${2} @@ -131,7 +131,7 @@ describe('modules/versioning/semver-coerced/index', () => { }); describe('.isStable(input)', () => { - test.each` + it.each` version | expected ${'1.0.0'} | ${true} ${'v1.3.5'} | ${true} diff --git a/lib/modules/versioning/semver/common.spec.ts b/lib/modules/versioning/semver/common.spec.ts index 372ede4bdd9ae7650439a37e6ab4db04ecdfdb4f..b9fea2cae8cef8783e4b644a62f3a1b1fd005095 100644 --- a/lib/modules/versioning/semver/common.spec.ts +++ b/lib/modules/versioning/semver/common.spec.ts @@ -1,7 +1,7 @@ import { isSemVerXRange } from './common'; describe('modules/versioning/semver/common', () => { - test.each` + it.each` range | expected ${'*'} | ${true} ${'x'} | ${true} diff --git a/lib/modules/versioning/semver/index.spec.ts b/lib/modules/versioning/semver/index.spec.ts index e2e27dea2b8f38e3fe4c1ea032986a3e995b4e7a..f99a043ac734eaff36c2e2b53f0635d216053658 100644 --- a/lib/modules/versioning/semver/index.spec.ts +++ b/lib/modules/versioning/semver/index.spec.ts @@ -1,7 +1,7 @@ import semver from '.'; describe('modules/versioning/semver/index', () => { - test.each` + it.each` version | expected ${'17.04.0'} | ${false} ${'1.2.3'} | ${true} @@ -17,7 +17,7 @@ describe('modules/versioning/semver/index', () => { expect(!!semver.isValid(version)).toBe(expected); }); - test.each` + it.each` version | expected ${'1.2.3'} | ${true} ${'1.2.3-alpha.1'} | ${true} @@ -28,7 +28,7 @@ describe('modules/versioning/semver/index', () => { expect(!!semver.isSingleVersion(version)).toBe(expected); }); - test.each` + it.each` currentValue | rangeStrategy | currentVersion | newVersion | expected ${'=1.0.0'} | ${'bump'} | ${'1.0.0'} | ${'1.1.0'} | ${'1.1.0'} `( @@ -44,7 +44,7 @@ describe('modules/versioning/semver/index', () => { } ); - test.each` + it.each` version | expected ${'1.2.0'} | ${true} `('isCompatible("$version") === $expected', ({ version, expected }) => { diff --git a/lib/modules/versioning/swift/index.spec.ts b/lib/modules/versioning/swift/index.spec.ts index b2f0d8621784afa746c13b6cc96f68cd80d8a1ac..2ee3e7a820b0e58a8853d49e06cce46debf33919 100644 --- a/lib/modules/versioning/swift/index.spec.ts +++ b/lib/modules/versioning/swift/index.spec.ts @@ -11,7 +11,7 @@ const { } = swift; describe('modules/versioning/swift/index', () => { - test.each` + it.each` version | expected ${'from: "1.2.3"'} | ${false} ${'1.2.3'} | ${true} @@ -19,7 +19,7 @@ describe('modules/versioning/swift/index', () => { expect(!!isVersion(version)).toBe(expected); }); - test.each` + it.each` version | expected ${'from: "1.2.3"'} | ${true} ${'from : "1.2.3"'} | ${true} @@ -57,7 +57,7 @@ describe('modules/versioning/swift/index', () => { expect(!!isValid(version)).toBe(expected); }); - test.each` + it.each` versions | range | expected ${['1.2.3', '1.2.4', '1.2.5']} | ${'..<"1.2.4"'} | ${'1.2.3'} ${['v1.2.3', 'v1.2.4', 'v1.2.5']} | ${'..<"1.2.4"'} | ${'1.2.3'} @@ -68,7 +68,7 @@ describe('modules/versioning/swift/index', () => { } ); - test.each` + it.each` versions | range | expected ${['1.2.3', '1.2.4', '1.2.5']} | ${'..<"1.2.4"'} | ${'1.2.3'} ${['v1.2.3', 'v1.2.4', 'v1.2.5']} | ${'..<"1.2.4"'} | ${'1.2.3'} @@ -80,7 +80,7 @@ describe('modules/versioning/swift/index', () => { } ); - test.each` + it.each` version | range | expected ${'1.2.3'} | ${'..."1.2.4"'} | ${false} ${'v1.2.3'} | ${'..."1.2.4"'} | ${false} @@ -93,7 +93,7 @@ describe('modules/versioning/swift/index', () => { } ); - test.each` + it.each` version | range | expected ${'1.2.4'} | ${'..."1.2.4"'} | ${true} ${'v1.2.4'} | ${'..."1.2.4"'} | ${true} @@ -106,7 +106,7 @@ describe('modules/versioning/swift/index', () => { } ); - test.each` + it.each` currentValue | rangeStrategy | currentVersion | newVersion | expected ${'1.2.3'} | ${'auto'} | ${'1.2.3'} | ${'1.2.4'} | ${'1.2.3'} ${'v1.2.3'} | ${'auto'} | ${'v1.2.3'} | ${'v1.2.4'} | ${'v1.2.3'} diff --git a/lib/modules/versioning/ubuntu/index.spec.ts b/lib/modules/versioning/ubuntu/index.spec.ts index 9d5a5621ba428c9a80ee22eab5ca5790c2340665..116828621d77d221b64442d7d1f8e3bf51d6b6f5 100644 --- a/lib/modules/versioning/ubuntu/index.spec.ts +++ b/lib/modules/versioning/ubuntu/index.spec.ts @@ -8,7 +8,7 @@ describe('modules/versioning/ubuntu/index', () => { jest.resetAllMocks(); }); - test.each` + it.each` version | expected ${undefined} | ${false} ${null} | ${false} @@ -89,7 +89,7 @@ describe('modules/versioning/ubuntu/index', () => { expect(ubuntu.isValid(version)).toBe(expected); }); - test.each` + it.each` version | range | expected ${undefined} | ${undefined} | ${false} ${null} | ${undefined} | ${false} @@ -105,7 +105,7 @@ describe('modules/versioning/ubuntu/index', () => { } ); - test.each` + it.each` version | expected ${undefined} | ${false} ${null} | ${false} @@ -116,7 +116,7 @@ describe('modules/versioning/ubuntu/index', () => { expect(ubuntu.isSingleVersion(version)).toBe(expected); }); - test.each` + it.each` version | expected ${undefined} | ${false} ${null} | ${false} @@ -197,7 +197,7 @@ describe('modules/versioning/ubuntu/index', () => { expect(ubuntu.isStable(version)).toBe(expected); }); - test.each` + it.each` version | expected ${undefined} | ${false} ${null} | ${false} @@ -250,7 +250,7 @@ describe('modules/versioning/ubuntu/index', () => { expect(ubuntu.isVersion(version)).toBe(expected); }); - test.each` + it.each` version | major | minor | patch ${undefined} | ${null} | ${null} | ${null} ${null} | ${null} | ${null} | ${null} @@ -272,7 +272,7 @@ describe('modules/versioning/ubuntu/index', () => { } ); - test.each` + it.each` a | b | expected ${'20.04'} | ${'2020.04'} | ${false} ${'17.10'} | ${'artful'} | ${true} @@ -287,7 +287,7 @@ describe('modules/versioning/ubuntu/index', () => { expect(ubuntu.equals(a, b)).toBe(expected); }); - test.each` + it.each` a | b | expected ${'20.04'} | ${'20.10'} | ${false} ${'20.10'} | ${'20.04'} | ${true} @@ -314,7 +314,7 @@ describe('modules/versioning/ubuntu/index', () => { expect(ubuntu.isGreaterThan(a, b)).toBe(expected); }); - test.each` + it.each` versions | range | expected ${['18.10', '19.04', '19.10', '20.04']} | ${'2020.04'} | ${null} ${['18.10', '19.04', '19.10', '20.04']} | ${'foobar'} | ${null} @@ -333,7 +333,7 @@ describe('modules/versioning/ubuntu/index', () => { } ); - test.each` + it.each` versions | range | expected ${['18.10', '19.04', '19.10', '20.04']} | ${'2020.04'} | ${null} ${['18.10', '19.04', '19.10', '20.04']} | ${'foobar'} | ${null} @@ -352,7 +352,7 @@ describe('modules/versioning/ubuntu/index', () => { } ); - test.each` + it.each` currentValue | rangeStrategy | currentVersion | newVersion | expected ${undefined} | ${undefined} | ${undefined} | ${'foobar'} | ${'foobar'} ${'xenial'} | ${undefined} | ${undefined} | ${'20.04'} | ${'focal'} @@ -373,7 +373,7 @@ describe('modules/versioning/ubuntu/index', () => { } ); - test.each` + it.each` versions | expected ${['17.03', '18.04', '18.04', '6.10', '19.10']} | ${['6.10', '17.03', '18.04', '18.04', '19.10']} ${['17.03', 'zesty', 'bionic', 'bionic', 'edgy', 'eoan']} | ${['edgy', '17.03', 'zesty', 'bionic', 'bionic', 'eoan']} @@ -381,7 +381,7 @@ describe('modules/versioning/ubuntu/index', () => { expect(versions.sort(ubuntu.sortVersions)).toEqual(expected); }); - test.each` + it.each` version | range | expected ${'20.04'} | ${'2020.04'} | ${false} ${'20.04'} | ${'20.04'} | ${true} diff --git a/lib/util/exec/hermit.spec.ts b/lib/util/exec/hermit.spec.ts index 7487516fbd39fdce6525a05437c7208589c4e5a9..702402b8617acc15d3080358b9b340558aed0c19 100644 --- a/lib/util/exec/hermit.spec.ts +++ b/lib/util/exec/hermit.spec.ts @@ -27,7 +27,7 @@ describe('util/exec/hermit', () => { findUp.mockClear(); }); - test.each` + it.each` dir | hermitLocation | expected ${'nested/other/directory'} | ${'nested/bin/hermit'} | ${'nested/bin'} ${'nested'} | ${'nested/bin/hermit'} | ${'nested/bin'} diff --git a/lib/util/exec/index.spec.ts b/lib/util/exec/index.spec.ts index 909880e061ad0e2af680938047f16a2594b6ad14..19f18c32268b14166f4b63fed3b085f3008ee619 100644 --- a/lib/util/exec/index.spec.ts +++ b/lib/util/exec/index.spec.ts @@ -732,7 +732,7 @@ describe('util/exec/index', () => { ], ]; - test.each(testInputs)('%s', async (_msg, testOpts) => { + it.each(testInputs)('%s', async (_msg, testOpts) => { const { processEnv: procEnv, inCmd: cmd, diff --git a/lib/util/fs/index.spec.ts b/lib/util/fs/index.spec.ts index e97ebf1a41257befee5d648262c9c433a71c10c2..f200818843e2d7e549692c84531dc40e0273708f 100644 --- a/lib/util/fs/index.spec.ts +++ b/lib/util/fs/index.spec.ts @@ -71,7 +71,7 @@ describe('util/fs/index', () => { }); describe('getParentDir', () => { - test.each` + it.each` dir | expected ${'/foo/bar/'} | ${'/foo'} ${'/foo/bar'} | ${'/foo'} @@ -92,7 +92,7 @@ describe('util/fs/index', () => { }); describe('getSiblingFileName', () => { - test.each` + it.each` file | sibling | expected ${'/foo/bar'} | ${'baz'} | ${'/foo/baz'} ${'foo/bar'} | ${'baz'} | ${'foo/baz'} diff --git a/lib/util/fs/util.spec.ts b/lib/util/fs/util.spec.ts index 345acf38c21adc1d483d4e012843671bc5644b73..06997baf6efecc68faa6bb20be7e03e71293cdff 100644 --- a/lib/util/fs/util.spec.ts +++ b/lib/util/fs/util.spec.ts @@ -11,7 +11,7 @@ describe('util/fs/util', () => { GlobalConfig.set({ localDir, cacheDir }); }); - test.each` + it.each` path | fullPath ${''} | ${`${localDir}`} ${'baz'} | ${`${localDir}/baz`} @@ -19,7 +19,7 @@ describe('util/fs/util', () => { expect(ensureLocalPath(path)).toBe(fullPath); }); - test.each` + it.each` path ${'..'} ${'../etc/passwd'} @@ -30,7 +30,7 @@ describe('util/fs/util', () => { expect(() => ensureLocalPath(path)).toThrow(FILE_ACCESS_VIOLATION_ERROR); }); - test.each` + it.each` path | fullPath ${''} | ${`${cacheDir}`} ${'baz'} | ${`${cacheDir}/baz`} @@ -38,7 +38,7 @@ describe('util/fs/util', () => { expect(ensureCachePath(path)).toBe(fullPath); }); - test.each` + it.each` path ${'..'} ${'../etc/passwd'} diff --git a/lib/util/github/graphql/datasource-fetcher.spec.ts b/lib/util/github/graphql/datasource-fetcher.spec.ts index e9489664772f8c6f258c5b20fe622bdb25314508..082d9bad32d392604cac19e78ed08f88cf66faad 100644 --- a/lib/util/github/graphql/datasource-fetcher.spec.ts +++ b/lib/util/github/graphql/datasource-fetcher.spec.ts @@ -382,7 +382,7 @@ describe('util/github/graphql/datasource-fetcher', () => { { version: v1, releaseTimestamp: t1, foo: '1' }, ]; - test.each` + it.each` isPrivate | isCacheable ${undefined} | ${false} ${true} | ${false} diff --git a/lib/util/github/graphql/util.spec.ts b/lib/util/github/graphql/util.spec.ts index 872805ecdcb89aa87430eb58e51f676d7f57e5a6..00a61702cd9b7e1b70b83a3b650918f92d70cb21 100644 --- a/lib/util/github/graphql/util.spec.ts +++ b/lib/util/github/graphql/util.spec.ts @@ -32,7 +32,7 @@ describe('util/github/graphql/util', () => { }); }); - test.each` + it.each` currentTime | initialTimestamp | duration | expected ${'2022-11-25 15:58'} | ${'2022-11-25 15:00'} | ${{ hours: 1 }} | ${false} ${'2022-11-25 15:59'} | ${'2022-11-25 15:00'} | ${{ hours: 1 }} | ${false} diff --git a/lib/util/pretty-time.spec.ts b/lib/util/pretty-time.spec.ts index 266089e7e03c29d3154acb63d284eb83d98dc818..0375f2f6d4b6077d1198cfd8394b37acd49f0cda 100644 --- a/lib/util/pretty-time.spec.ts +++ b/lib/util/pretty-time.spec.ts @@ -1,7 +1,7 @@ import { toMs } from './pretty-time'; describe('util/pretty-time', () => { - test.each` + it.each` input | expected ${'1h'} | ${1 * 60 * 60 * 1000} ${' 1 h '} | ${1 * 60 * 60 * 1000} diff --git a/lib/util/range.spec.ts b/lib/util/range.spec.ts index 046f527143fb9fdf698cbf25c7349f4c391c9762..9d3a319c4369d23cfd951d1c34725cff0f607e20 100644 --- a/lib/util/range.spec.ts +++ b/lib/util/range.spec.ts @@ -1,7 +1,7 @@ import { range } from './range'; describe('util/range', () => { - test.each` + it.each` start | end | expected ${0} | ${0} | ${[0]} ${0} | ${1} | ${[0, 1]} diff --git a/lib/util/url.spec.ts b/lib/util/url.spec.ts index b9a5b723a5be62a2e8bcec35a93ddbe5b0821c81..c8ec5d95231855cedc95d2b12a81df342aedaf88 100644 --- a/lib/util/url.spec.ts +++ b/lib/util/url.spec.ts @@ -14,7 +14,7 @@ import { } from './url'; describe('util/url', () => { - test.each` + it.each` baseUrl | x | result ${'http://foo.io'} | ${''} | ${'http://foo.io'} ${'http://foo.io/'} | ${''} | ${'http://foo.io'} @@ -53,7 +53,7 @@ describe('util/url', () => { expect(resolveBaseUrl(baseUrl, x)).toBe(result); }); - test.each` + it.each` baseUrl | x | result ${'http://foo.io'} | ${''} | ${'http://foo.io'} ${'http://foo.io/'} | ${''} | ${'http://foo.io'} diff --git a/lib/workers/global/config/parse/cli.spec.ts b/lib/workers/global/config/parse/cli.spec.ts index 1c66d49b9a4648950496eb8be5ad064d4266f3dd..a98b4f89390d20ba61556c7ab195a6b02a9ed93d 100644 --- a/lib/workers/global/config/parse/cli.spec.ts +++ b/lib/workers/global/config/parse/cli.spec.ts @@ -121,7 +121,7 @@ describe('workers/global/config/parse/cli', () => { }); }); - test.each` + it.each` arg | config ${'--endpoints='} | ${{ hostRules: [] }} ${'--azure-auto-complete=false'} | ${{ platformAutomerge: false }} diff --git a/lib/workers/repository/update/branch/schedule.spec.ts b/lib/workers/repository/update/branch/schedule.spec.ts index 6c395ffc47f9f70573dd5af1bfbb63773e852109..f8e75be82e42543bc84252aee04d291175f8564a 100644 --- a/lib/workers/repository/update/branch/schedule.spec.ts +++ b/lib/workers/repository/update/branch/schedule.spec.ts @@ -264,7 +264,7 @@ describe('workers/repository/update/branch/schedule', () => { }); describe('supports timezone', () => { - test.each` + it.each` sched | tz | datetime | expected ${'after 4pm'} | ${'Asia/Singapore'} | ${'2017-06-30T15:59:00.000+0800'} | ${false} ${'after 4pm'} | ${'Asia/Singapore'} | ${'2017-06-30T16:01:00.000+0800'} | ${true}