Commit 03445de8 authored by Luke "Jared" Bennett's avatar Luke "Jared" Bennett

Fix karma

parent a153f006
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
class="js-write-link" class="js-write-link"
href="#md-write-holder" href="#md-write-holder"
tabindex="-1" tabindex="-1"
@click.prevent="writeMarkdownTab($event, form)"> @click.prevent="writeMarkdownTab($event)">
Write Write
</a> </a>
</li> </li>
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
class="js-preview-link" class="js-preview-link"
href="#md-preview-holder" href="#md-preview-holder"
tabindex="-1" tabindex="-1"
@click.prevent="previewMarkdownTab($event, form)"> @click.prevent="previewMarkdownTab($event)">
Preview Preview
</a> </a>
</li> </li>
......
...@@ -43,11 +43,13 @@ describe('Markdown field header component', () => { ...@@ -43,11 +43,13 @@ describe('Markdown field header component', () => {
it('emits toggle markdown event when clicking preview', () => { it('emits toggle markdown event when clicking preview', () => {
spyOn(vm, '$emit'); spyOn(vm, '$emit');
vm.$el.querySelector('li:nth-child(2) a').click(); vm.$el.querySelector('.js-preview-link').click();
expect( expect(vm.$emit).toHaveBeenCalledWith('preview-markdown');
vm.$emit,
).toHaveBeenCalledWith('toggle-markdown'); vm.$el.querySelector('.js-write-link').click();
expect(vm.$emit).toHaveBeenCalledWith('write-markdown');
}); });
it('blurs preview link after click', (done) => { it('blurs preview link after click', (done) => {
......
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