Skip to content
Snippets Groups Projects
Select Git revision
  • 80934e65f5f0768dbd221f5b88b6017d6c7e2ac7
  • main default protected
  • renovate/main-renovatebot-osv-offline-1.x
  • fix/36927-maven-tags
  • renovate/main-redis-5.x
  • next
  • revert-31645-feat/rename-gradle-wrapper-validation-action
  • fix/36615b-branch-reuse-no-cache
  • chore/punycode
  • refactor/pin-new-value
  • feat/36219--git-x509-signing
  • feat/structured-logger
  • hotfix/39.264.1
  • feat/skip-dangling
  • gh-readonly-queue/next/pr-36034-7a061c4ca1024a19e2c295d773d9642625d1c2be
  • hotfix/39.238.3
  • refactor/gitlab-auto-approve
  • feat/template-strings
  • gh-readonly-queue/next/pr-35654-137d934242c784e0c45d4b957362214f0eade1d7
  • fix/32307-global-extends-merging
  • fix/32307-global-extends-repositories
  • 41.37.7
  • 41.37.6
  • 41.37.5
  • 41.37.4
  • 41.37.3
  • 41.37.2
  • 41.37.1
  • 41.37.0
  • 41.36.2
  • 41.36.1
  • 41.36.0
  • 41.35.2
  • 41.35.1
  • 41.35.0
  • 41.34.1
  • 41.34.0
  • 41.33.0
  • 41.32.3
  • 41.32.2
  • 41.32.1
41 results

platform.spec.ts

Blame
  • user avatar
    RahulGautamSingh authored and GitHub committed
    c56588ea
    History
    platform.spec.ts 2.60 KiB
    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();
      });
    });