diff options
author | Phil Hughes <me@iamphill.com> | 2017-06-20 10:35:15 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-06-20 10:35:15 +0300 |
commit | 27664b7d9f18ed4cb6e4f8eba91e81d534df18a2 (patch) | |
tree | cc6d026d4d15c6e7b7be676fef829ee2834d62d1 /spec/javascripts | |
parent | 521840a4943dce96d467768754076a4fbe51fa0d (diff) | |
parent | 84e23ae06c3b42ec2da8a8967820b24ce7566ff8 (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/javascripts')
-rw-r--r-- | spec/javascripts/issue_show/components/description_spec.js | 16 |
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(); + }); + }); + }); }); |