summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorEric Eastwood <contact@ericeastwood.com>2017-06-19 15:29:46 -0500
committerEric Eastwood <contact@ericeastwood.com>2017-06-19 15:29:46 -0500
commit84e23ae06c3b42ec2da8a8967820b24ce7566ff8 (patch)
tree6aa1c8c573b72255ce14d664af52eb819af86dbf /spec
parente4eeba4e4b33c327d5c95a48103ab5781d15c77c (diff)
downloadgitlab-ce-84e23ae06c3b42ec2da8a8967820b24ce7566ff8.tar.gz
Fix issue description syntax highlighting and math rendering33877-fix-issue-description-highlight-and-math
Fix https://gitlab.com/gitlab-org/gitlab-ce/issues/33877 Regressed in https://gitlab.com/gitlab-org/gitlab-ce/commit/5a95d6f8dae00b31b694759c6ddbf6d83b1a7890#3a15290e7696397415523e0b664aceb3dd4010ae_0_46 where the ref no longer matches what we call `renderGFM` on.
Diffstat (limited to 'spec')
-rw-r--r--spec/javascripts/issue_show/components/description_spec.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/javascripts/issue_show/components/description_spec.js b/spec/javascripts/issue_show/components/description_spec.js
index 408349cc42d..886462c4b9a 100644
--- a/spec/javascripts/issue_show/components/description_spec.js
+++ b/spec/javascripts/issue_show/components/description_spec.js
@@ -96,4 +96,20 @@ describe('Description component', () => {
});
});
});
+
+ it('applies syntax highlighting and math when description changed', (done) => {
+ spyOn(vm, 'renderGFM').and.callThrough();
+ spyOn($.prototype, 'renderGFM').and.callThrough();
+ vm.descriptionHtml = 'changed';
+
+ Vue.nextTick(() => {
+ setTimeout(() => {
+ expect(vm.$refs['gfm-content']).toBeDefined();
+ expect(vm.renderGFM).toHaveBeenCalled();
+ expect($.prototype.renderGFM).toHaveBeenCalled();
+
+ done();
+ });
+ });
+ });
});