Fix karma

This commit is contained in:
Luke "Jared" Bennett 2017-11-02 17:33:44 +00:00
parent a153f006ff
commit 03445de899
No known key found for this signature in database
GPG key ID: 402ED51FB5D306C2
2 changed files with 8 additions and 6 deletions

View file

@ -53,7 +53,7 @@
class="js-write-link"
href="#md-write-holder"
tabindex="-1"
@click.prevent="writeMarkdownTab($event, form)">
@click.prevent="writeMarkdownTab($event)">
Write
</a>
</li>
@ -62,7 +62,7 @@
class="js-preview-link"
href="#md-preview-holder"
tabindex="-1"
@click.prevent="previewMarkdownTab($event, form)">
@click.prevent="previewMarkdownTab($event)">
Preview
</a>
</li>

View file

@ -43,11 +43,13 @@ describe('Markdown field header component', () => {
it('emits toggle markdown event when clicking preview', () => {
spyOn(vm, '$emit');
vm.$el.querySelector('li:nth-child(2) a').click();
vm.$el.querySelector('.js-preview-link').click();
expect(
vm.$emit,
).toHaveBeenCalledWith('toggle-markdown');
expect(vm.$emit).toHaveBeenCalledWith('preview-markdown');
vm.$el.querySelector('.js-write-link').click();
expect(vm.$emit).toHaveBeenCalledWith('write-markdown');
});
it('blurs preview link after click', (done) => {