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
path: root/spec
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-06-20 10:35:15 +0300
committerkushalpandya <kushal@gitlab.com>2017-06-20 11:31:03 +0300
commitd272a50519b91a15dbeda8b63afef24606d9520b (patch)
treece40c1a529eda0399bfa3a11ee455435343a3c2a /spec
parentb6effa5cb63885c4c1202e2c65d7cbd3ad62bc16 (diff)
Merge branch '33877-fix-issue-description-highlight-and-math' into 'master'
Fix issue description syntax highlighting and math rendering Closes #33877 See merge request !12282
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();
+ });
+ });
+ });
});