Skip to content

Commit

Permalink
test(changelog): moves tests to respective source-platform folder (#2…
Browse files Browse the repository at this point in the history
  • Loading branch information
setchy authored Jul 3, 2023
1 parent 1f3a14a commit 9c9c17b
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 32 deletions.
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -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": {
Expand Down
Original file line number Diff line number Diff line change
@@ -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',
Expand All @@ -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);
Expand Down
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -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": {
Expand Down
Original file line number Diff line number Diff line change
@@ -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',
Expand All @@ -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);
Expand Down

0 comments on commit 9c9c17b

Please sign in to comment.