Skip to content
Snippets Groups Projects
Select Git revision
  • c1245b2d4b6b1a7e0b866a140f844a7de2dbe110
  • main default protected
  • renovate/main-vitest-monorepo
  • next
  • fix/36615b-branch-reuse-no-cache
  • chore/punycode
  • fix/36615-branch-reuse-bug
  • renovate/main-redis-5.x
  • renovate/main-xmldoc-2.x
  • 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.9.0
  • 41.8.0
  • 41.7.2
  • 41.7.1
  • 41.7.0
  • 41.6.4
  • 41.6.3
  • 41.6.2
  • 41.6.1
  • 41.6.0
  • 41.5.0
  • 41.4.0
  • 41.3.0
  • 41.2.0
  • 41.1.4
  • 41.1.3
  • 41.1.2
  • 41.1.1
  • 41.1.0
  • 41.0.0
41 results

extract-update.ts

Blame
  • markdown.spec.ts 1.34 KiB
    import { linkify } from './markdown';
    
    describe('util/markdown', () => {
      describe('.linkify', () => {
        const before = `Some references:
    
    *   Commit: f8083175fe890cbf14f41d0a06e7aa35d4989587
    *   Commit (fork): foo@f8083175fe890cbf14f41d0a06e7aa35d4989587
    *   Commit (repo): remarkjs/remark@e1aa9f6c02de18b9459b7d269712bcb50183ce89
    *   Issue or PR (\`#\`): #1
    *   Issue or PR (\`GH-\`): GH-1
    *   Issue or PR (fork): foo#1
    *   Issue or PR (project): remarkjs/remark#1
    *   Mention: @wooorm
    `;
    
        const after = `Some references:
    
    -   Commit: [\`f808317\`](https://github.com/some/repo/commit/f8083175fe890cbf14f41d0a06e7aa35d4989587)
    -   Commit (fork): [foo@\`f808317\`](https://github.com/foo/repo/commit/f8083175fe890cbf14f41d0a06e7aa35d4989587)
    -   Commit (repo): [remarkjs/remark@\`e1aa9f6\`](https://github.com/remarkjs/remark/commit/e1aa9f6c02de18b9459b7d269712bcb50183ce89)
    -   Issue or PR (\`#\`): [#1](https://github.com/some/repo/issues/1)
    -   Issue or PR (\`GH-\`): [GH-1](https://github.com/some/repo/issues/1)
    -   Issue or PR (fork): [foo#1](https://github.com/foo/repo/issues/1)
    -   Issue or PR (project): [remarkjs/remark#1](https://github.com/remarkjs/remark/issues/1)
    -   Mention: [@wooorm](https://github.com/wooorm)
    `;
    
        it('works', async () => {
          expect(await linkify(before, { repository: 'some/repo' })).toEqual(after);
        });
      });
    });