Commit a3cf3e50 authored by Filipa Lacerda's avatar Filipa Lacerda

Fix broken markdown field test

parent c7dbba8b
......@@ -64,12 +64,11 @@
.then(resp => resp.json())
.then((data) => {
this.markdownPreviewLoading = false;
this.markdownPreview = data.body;
this.markdownPreview = data.body || 'Nothing to preview.';
if (data.references) {
this.referencedCommands = data.references.commands;
this.referencedUsers = data.references.users;
if (!this.markdownPreview) {
this.markdownPreview = 'Nothing to preview.';
}
this.$nextTick(() => {
......
......@@ -92,6 +92,7 @@ describe('Markdown field component', () => {
it('renders GFM with jQuery', (done) => {
spyOn($.fn, 'renderGFM');
previewLink.click();
setTimeout(() => {
......@@ -100,7 +101,7 @@ describe('Markdown field component', () => {
).toHaveBeenCalled();
done();
});
}, 0);
});
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment