Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/static_site_editor/services/formatter_spec.js')
-rw-r--r--spec/frontend/static_site_editor/services/formatter_spec.js26
1 files changed, 26 insertions, 0 deletions
diff --git a/spec/frontend/static_site_editor/services/formatter_spec.js b/spec/frontend/static_site_editor/services/formatter_spec.js
new file mode 100644
index 00000000000..b7600798db9
--- /dev/null
+++ b/spec/frontend/static_site_editor/services/formatter_spec.js
@@ -0,0 +1,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);
+ });
+});