summaryrefslogtreecommitdiff
path: root/spec/frontend/static_site_editor/services/formatter_spec.js
blob: b7600798db9fc259c684e43c62fcd052b91ef88f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import formatter from '~/static_site_editor/services/formatter';

describe('formatter', () => {
  const source = `Some text
<br>

And some more text


<br>


And even more text`;
  const sourceWithoutBrTags = `Some text

And some more text




And even more text`;

  it('removes extraneous <br> tags', () => {
    expect(formatter(source)).toMatch(sourceWithoutBrTags);
  });
});