INNER CODE UNIT · TypeScript

processMarkdown

react/react-native-website · plugins/remark-lint-no-dead-urls/src/__tests__/index.ts:23

function processMarkdown(md: string, opts: Options = {}) {
  return remark().use(plugin, opts).process(md);
}

describe('remark-lint-no-dead-urls', () => {
  beforeEach(() => {
    mockFetch.mockReset();
  });

  test('works with no URLs', async () => {
    const lint = processMarkdown(dedent`
      # Title

      No URLs in here.
    `);

    const vFile = await lint;
    expect(mockFetch).toHaveBeenCalledTimes(0);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…