diff --git a/lib/workers/repository/update/pr/changelog/__snapshots__/github.spec.ts.snap b/lib/workers/repository/update/pr/changelog/github/__snapshots__/index.spec.ts.snap similarity index 92% rename from lib/workers/repository/update/pr/changelog/__snapshots__/github.spec.ts.snap rename to lib/workers/repository/update/pr/changelog/github/__snapshots__/index.spec.ts.snap index bf1018023d13a05575c44c4a37c1203122999c36..59fa65d000c72e343a51829c69520f903bd91501 100644 --- a/lib/workers/repository/update/pr/changelog/__snapshots__/github.spec.ts.snap +++ b/lib/workers/repository/update/pr/changelog/github/__snapshots__/index.spec.ts.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`workers/repository/update/pr/changelog/github getChangeLogJSON filters unnecessary warns 1`] = ` +exports[`workers/repository/update/pr/changelog/github/index getChangeLogJSON filters unnecessary warns 1`] = ` { "hasReleaseNotes": true, "project": { @@ -59,7 +59,7 @@ exports[`workers/repository/update/pr/changelog/github getChangeLogJSON filters } `; -exports[`workers/repository/update/pr/changelog/github getChangeLogJSON supports github enterprise and github enterprise changelog 1`] = ` +exports[`workers/repository/update/pr/changelog/github/index getChangeLogJSON supports github enterprise and github enterprise changelog 1`] = ` { "hasReleaseNotes": true, "project": { @@ -118,7 +118,7 @@ exports[`workers/repository/update/pr/changelog/github getChangeLogJSON supports } `; -exports[`workers/repository/update/pr/changelog/github getChangeLogJSON supports github enterprise and github.com changelog 1`] = ` +exports[`workers/repository/update/pr/changelog/github/index getChangeLogJSON supports github enterprise and github.com changelog 1`] = ` { "hasReleaseNotes": true, "project": { @@ -177,7 +177,7 @@ exports[`workers/repository/update/pr/changelog/github getChangeLogJSON supports } `; -exports[`workers/repository/update/pr/changelog/github getChangeLogJSON supports node engines 1`] = ` +exports[`workers/repository/update/pr/changelog/github/index getChangeLogJSON supports node engines 1`] = ` { "hasReleaseNotes": true, "project": { @@ -236,7 +236,7 @@ exports[`workers/repository/update/pr/changelog/github getChangeLogJSON supports } `; -exports[`workers/repository/update/pr/changelog/github getChangeLogJSON uses GitHub tags 1`] = ` +exports[`workers/repository/update/pr/changelog/github/index getChangeLogJSON uses GitHub tags 1`] = ` { "hasReleaseNotes": true, "project": { @@ -295,7 +295,7 @@ exports[`workers/repository/update/pr/changelog/github getChangeLogJSON uses Git } `; -exports[`workers/repository/update/pr/changelog/github getChangeLogJSON works without Github 1`] = ` +exports[`workers/repository/update/pr/changelog/github/index getChangeLogJSON works without Github 1`] = ` { "hasReleaseNotes": true, "project": { diff --git a/lib/workers/repository/update/pr/changelog/github.spec.ts b/lib/workers/repository/update/pr/changelog/github/index.spec.ts similarity index 94% rename from lib/workers/repository/update/pr/changelog/github.spec.ts rename to lib/workers/repository/update/pr/changelog/github/index.spec.ts index 3e40fde15395ce8ea18773cf301f655d5bc3a389..386e792d1b6af2f84c5f8b1fcbe63052cc139df9 100644 --- a/lib/workers/repository/update/pr/changelog/github.spec.ts +++ b/lib/workers/repository/update/pr/changelog/github/index.spec.ts @@ -1,14 +1,14 @@ -import * as httpMock from '../../../../../../test/http-mock'; -import { partial } from '../../../../../../test/util'; -import { GlobalConfig } from '../../../../../config/global'; -import * as semverVersioning from '../../../../../modules/versioning/semver'; -import * as githubGraphql from '../../../../../util/github/graphql'; -import type { GithubTagItem } from '../../../../../util/github/graphql/types'; -import * as hostRules from '../../../../../util/host-rules'; -import type { BranchUpgradeConfig } from '../../../../types'; -import { getChangeLogJSON } from '.'; +import { getChangeLogJSON } from '..'; +import * as httpMock from '../../../../../../../test/http-mock'; +import { partial } from '../../../../../../../test/util'; +import { GlobalConfig } from '../../../../../../config/global'; +import * as semverVersioning from '../../../../../../modules/versioning/semver'; +import * as githubGraphql from '../../../../../../util/github/graphql'; +import type { GithubTagItem } from '../../../../../../util/github/graphql/types'; +import * as hostRules from '../../../../../../util/host-rules'; +import type { BranchUpgradeConfig } from '../../../../../types'; -jest.mock('../../../../../modules/datasource/npm'); +jest.mock('../../../../../../modules/datasource/npm'); const upgrade = partial<BranchUpgradeConfig>({ manager: 'some-manager', @@ -33,7 +33,7 @@ const upgrade = partial<BranchUpgradeConfig>({ ], }); -describe('workers/repository/update/pr/changelog/github', () => { +describe('workers/repository/update/pr/changelog/github/index', () => { afterEach(() => { // FIXME: add missing http mocks httpMock.clear(false); diff --git a/lib/workers/repository/update/pr/changelog/__snapshots__/gitlab.spec.ts.snap b/lib/workers/repository/update/pr/changelog/gitlab/__snapshots__/index.spec.ts.snap similarity index 90% rename from lib/workers/repository/update/pr/changelog/__snapshots__/gitlab.spec.ts.snap rename to lib/workers/repository/update/pr/changelog/gitlab/__snapshots__/index.spec.ts.snap index 0b9fc65d6e3dbcbd278fad4e9404149e9ce0cdc2..20133cafc079815c20f1b7f9820c91b6c494d149 100644 --- a/lib/workers/repository/update/pr/changelog/__snapshots__/gitlab.spec.ts.snap +++ b/lib/workers/repository/update/pr/changelog/gitlab/__snapshots__/index.spec.ts.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`workers/repository/update/pr/changelog/gitlab getChangeLogJSON handles empty GitLab tags response 1`] = ` +exports[`workers/repository/update/pr/changelog/gitlab/index getChangeLogJSON handles empty GitLab tags response 1`] = ` { "hasReleaseNotes": false, "project": { @@ -49,7 +49,7 @@ exports[`workers/repository/update/pr/changelog/gitlab getChangeLogJSON handles } `; -exports[`workers/repository/update/pr/changelog/gitlab getChangeLogJSON supports gitlab enterprise and gitlab enterprise changelog 1`] = ` +exports[`workers/repository/update/pr/changelog/gitlab/index getChangeLogJSON supports gitlab enterprise and gitlab enterprise changelog 1`] = ` { "hasReleaseNotes": false, "project": { @@ -98,7 +98,7 @@ exports[`workers/repository/update/pr/changelog/gitlab getChangeLogJSON supports } `; -exports[`workers/repository/update/pr/changelog/gitlab getChangeLogJSON supports self-hosted gitlab changelog 1`] = ` +exports[`workers/repository/update/pr/changelog/gitlab/index getChangeLogJSON supports self-hosted gitlab changelog 1`] = ` { "hasReleaseNotes": false, "project": { @@ -147,7 +147,7 @@ exports[`workers/repository/update/pr/changelog/gitlab getChangeLogJSON supports } `; -exports[`workers/repository/update/pr/changelog/gitlab getChangeLogJSON uses GitLab tags 1`] = ` +exports[`workers/repository/update/pr/changelog/gitlab/index getChangeLogJSON uses GitLab tags 1`] = ` { "hasReleaseNotes": true, "project": { @@ -216,7 +216,7 @@ exports[`workers/repository/update/pr/changelog/gitlab getChangeLogJSON uses Git } `; -exports[`workers/repository/update/pr/changelog/gitlab getChangeLogJSON uses GitLab tags with error 1`] = ` +exports[`workers/repository/update/pr/changelog/gitlab/index getChangeLogJSON uses GitLab tags with error 1`] = ` { "hasReleaseNotes": false, "project": { @@ -265,7 +265,7 @@ exports[`workers/repository/update/pr/changelog/gitlab getChangeLogJSON uses Git } `; -exports[`workers/repository/update/pr/changelog/gitlab getChangeLogJSON works without GitLab 1`] = ` +exports[`workers/repository/update/pr/changelog/gitlab/index getChangeLogJSON works without GitLab 1`] = ` { "hasReleaseNotes": false, "project": { diff --git a/lib/workers/repository/update/pr/changelog/gitlab.spec.ts b/lib/workers/repository/update/pr/changelog/gitlab/index.spec.ts similarity index 95% rename from lib/workers/repository/update/pr/changelog/gitlab.spec.ts rename to lib/workers/repository/update/pr/changelog/gitlab/index.spec.ts index b0de522d1fa0359423d321af49854fe1f1226530..9d4101102c8c831d073cc5bc944f1e84d3690056 100644 --- a/lib/workers/repository/update/pr/changelog/gitlab.spec.ts +++ b/lib/workers/repository/update/pr/changelog/gitlab/index.spec.ts @@ -1,11 +1,9 @@ -import * as httpMock from '../../../../../../test/http-mock'; -import { partial } from '../../../../../../test/util'; -import * as semverVersioning from '../../../../../modules/versioning/semver'; -import * as hostRules from '../../../../../util/host-rules'; -import type { BranchUpgradeConfig } from '../../../../types'; -import { getChangeLogJSON } from '.'; - -jest.mock('../../../../../modules/datasource/npm'); +import { getChangeLogJSON } from '..'; +import * as httpMock from '../../../../../../../test/http-mock'; +import { partial } from '../../../../../../../test/util'; +import * as semverVersioning from '../../../../../../modules/versioning/semver'; +import * as hostRules from '../../../../../../util/host-rules'; +import type { BranchUpgradeConfig } from '../../../../../types'; const upgrade = partial<BranchUpgradeConfig>({ manager: 'some-manager', @@ -31,7 +29,7 @@ const upgrade = partial<BranchUpgradeConfig>({ const matchHost = 'https://gitlab.com/'; -describe('workers/repository/update/pr/changelog/gitlab', () => { +describe('workers/repository/update/pr/changelog/gitlab/index', () => { afterEach(() => { // FIXME: add missing http mocks httpMock.clear(false);