Skip to content

An open source design system that's fully customizable and agent ready

TypeScript
558 B
Raw Blame
// Copyright (c) Meta Platforms, Inc. and affiliates.

import {describe, expect, it} from 'vitest';
import {stripHtmlComments} from '../components/docs/stripHtmlComments';

describe('stripHtmlComments', () => {
  it('hides the markers a generated README carries, and nothing else', () => {
    const readme =
      '# CLI\n\n<!-- BEGIN commands -->\n| a | b |\n<!-- Generated by a script.\nRun it. -->\n<!-- END commands -->\nText <b>kept</b>.\n';
    expect(stripHtmlComments(readme)).toBe(
      '# CLI\n\n| a | b |\nText <b>kept</b>.\n',
    );
  });
});