Skip to content
Snippets Groups Projects
Select Git revision
  • 7eef0d3ed0acd1c67224c55b87395df06bde9753
  • main default protected
  • renovate/main-ghcr.io-renovatebot-base-image-11.x
  • chore/update-pr-template
  • chore/maintainers-rarkins
  • refactor/pin-new-value
  • fix/user-agent
  • feat/37517-base64-private-key
  • next
  • feat/gnupg
  • fix/36615b-branch-reuse-no-cache
  • chore/punycode
  • 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
  • 41.82.6
  • 41.82.5
  • 41.82.4
  • 41.82.3
  • 41.82.2
  • 41.82.1
  • 41.82.0
  • 41.81.6
  • 41.81.5
  • 41.81.4
  • 41.81.3
  • 41.81.2
  • 41.81.1
  • 41.81.0
  • 41.80.0
  • 41.79.0
  • 41.78.1
  • 41.78.0
  • 41.77.0
  • 41.76.1
41 results

index.spec.ts

Blame
  • user avatar
    Michael Kriese authored and GitHub committed
    a02c8504
    History
    index.spec.ts 3.16 KiB
    import * as platform from './index';
    
    describe('modules/platform/local/index', () => {
      describe('initPlatform', () => {
        it('returns input', async () => {
          expect(await platform.initPlatform({})).toMatchInlineSnapshot(`
            {
              "dryRun": "lookup",
              "endpoint": "local",
              "persistRepoData": true,
              "requireConfig": "optional",
            }
          `);
        });
      });
    
      describe('getRepos', () => {
        it('returns empty array', async () => {
          expect(await platform.getRepos()).toEqual([]);
        });
      });
    
      describe('initRepo', () => {
        it('returns object', async () => {
          expect(await platform.initRepo()).toMatchInlineSnapshot(`
            {
              "defaultBranch": "",
              "isFork": false,
              "repoFingerprint": "",
            }
          `);
        });
      });
    
      describe('dummy functions', () => {
        it('findIssue', async () => {
          expect(await platform.findIssue()).toBeNull();
        });
    
        it('getIssueList', async () => {
          expect(await platform.getIssueList()).toEqual([]);
        });
    
        it('getRawFile', async () => {
          expect(await platform.getRawFile()).toBeNull();
        });
    
        it('getJsonFile', async () => {
          expect(await platform.getJsonFile()).toBeNull();
        });
    
        it('getPrList', async () => {
          expect(await platform.getPrList()).toEqual([]);
        });
    
        it('ensureIssueClosing', async () => {
          expect(await platform.ensureIssueClosing()).toBeUndefined();
        });
    
        it('ensureIssue', async () => {
          expect(await platform.ensureIssue()).toBeNull();
        });
    
        it('massageMarkdown', () => {
          expect(platform.massageMarkdown('foo')).toBe('foo');
        });
    
        it('maxBodyLength', () => {
          expect(platform.maxBodyLength()).toBe(Infinity);
        });
    
        it('updatePr', async () => {
          expect(await platform.updatePr()).toBeUndefined();
        });
    
        it('mergePr', async () => {
          expect(await platform.mergePr()).toBe(false);
        });
    
        it('addReviewers', async () => {
          expect(await platform.addReviewers()).toBeUndefined();
        });
    
        it('addAssignees', async () => {
          expect(await platform.addAssignees()).toBeUndefined();
        });
    
        it('createPr', async () => {
          expect(await platform.createPr()).toBeNull();
        });
    
        it('deleteLabel', async () => {
          expect(await platform.deleteLabel()).toBeUndefined();
        });
    
        it('setBranchStatus', async () => {
          expect(await platform.setBranchStatus()).toBeUndefined();
        });
    
        it('getBranchStatus', async () => {
          expect(await platform.getBranchStatus()).toBe('red');
        });
    
        it('getBranchStatusCheck', async () => {
          expect(await platform.getBranchStatusCheck()).toBeNull();
        });
    
        it('ensureCommentRemoval', async () => {
          expect(await platform.ensureCommentRemoval()).toBeUndefined();
        });
    
        it('ensureComment', async () => {
          expect(await platform.ensureComment()).toBeFalse();
        });
    
        it('getPr', async () => {
          expect(await platform.getPr()).toBeNull();
        });
    
        it('findPr', async () => {
          expect(await platform.findPr()).toBeNull();
        });
    
        it('getBranchPr', async () => {
          expect(await platform.getBranchPr()).toBeNull();
        });
      });
    });