forked from renovatebot/renovate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
platform.spec.ts
65 lines (60 loc) · 2.6 KB
/
platform.spec.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
import { BitbucketTagsDatasource } from '../modules/datasource/bitbucket-tags';
import { GithubReleasesDatasource } from '../modules/datasource/github-releases';
import { GithubTagsDatasource } from '../modules/datasource/github-tags';
import { GitlabPackagesDatasource } from '../modules/datasource/gitlab-packages';
import { GitlabReleasesDatasource } from '../modules/datasource/gitlab-releases';
import { GitlabTagsDatasource } from '../modules/datasource/gitlab-tags';
import { HermitDatasource } from '../modules/datasource/hermit';
import { PodDatasource } from '../modules/datasource/pod';
import { id as GITHUB_CHANGELOG_ID } from '../workers/repository/update/pr/changelog/github';
import { id as GITLAB_CHANGELOG_ID } from '../workers/repository/update/pr/changelog/gitlab';
import {
BITBUCKET_API_USING_HOST_TYPES,
GITHUB_API_USING_HOST_TYPES,
GITLAB_API_USING_HOST_TYPES,
} from './platforms';
describe('constants/platform', () => {
it('should be part of the GITLAB_API_USING_HOST_TYPES', () => {
expect(
GITLAB_API_USING_HOST_TYPES.includes(GitlabTagsDatasource.id)
).toBeTrue();
expect(
GITLAB_API_USING_HOST_TYPES.includes(GitlabReleasesDatasource.id)
).toBeTrue();
expect(
GITLAB_API_USING_HOST_TYPES.includes(GitlabPackagesDatasource.id)
).toBeTrue();
expect(
GITLAB_API_USING_HOST_TYPES.includes(GITLAB_CHANGELOG_ID)
).toBeTrue();
expect(GITLAB_API_USING_HOST_TYPES.includes('gitlab')).toBeTrue();
});
it('should be not part of the GITLAB_API_USING_HOST_TYPES ', () => {
expect(GITLAB_API_USING_HOST_TYPES.includes('github')).toBeFalse();
});
it('should be part of the GITHUB_API_USING_HOST_TYPES ', () => {
expect(
GITHUB_API_USING_HOST_TYPES.includes(GithubTagsDatasource.id)
).toBeTrue();
expect(
GITHUB_API_USING_HOST_TYPES.includes(GithubReleasesDatasource.id)
).toBeTrue();
expect(GITHUB_API_USING_HOST_TYPES.includes(PodDatasource.id)).toBeTrue();
expect(
GITHUB_API_USING_HOST_TYPES.includes(HermitDatasource.id)
).toBeTrue();
expect(
GITHUB_API_USING_HOST_TYPES.includes(GITHUB_CHANGELOG_ID)
).toBeTrue();
expect(GITHUB_API_USING_HOST_TYPES.includes('github')).toBeTrue();
});
it('should be not part of the GITHUB_API_USING_HOST_TYPES ', () => {
expect(GITHUB_API_USING_HOST_TYPES.includes('gitlab')).toBeFalse();
});
it('should be part of the BITBUCKET_API_USING_HOST_TYPES ', () => {
expect(
BITBUCKET_API_USING_HOST_TYPES.includes(BitbucketTagsDatasource.id)
).toBeTrue();
expect(BITBUCKET_API_USING_HOST_TYPES.includes('bitbucket')).toBeTrue();
});
});