Skip to content

Commit

Permalink
Test remove-icon slot
Browse files Browse the repository at this point in the history
  • Loading branch information
nakeeon committed Dec 12, 2018
1 parent 17f747c commit 8f20850
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/unit/InputTag.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -302,4 +302,22 @@ describe("InputTag.vue", () => {
).toBeUndefined();
});
});

describe("slots", () => {
beforeEach(() => {
wrapper = shallowMount(InputTag, {
slots: {
"remove-icon": '<span class="close" />'
}
});

addTag(wrapper, "foo");
});

it("should render 'remove icon' slot as remove icon for a tag", () => {
expect(wrapper.find("a.remove").html()).toBe(
'<a class="remove"><span class="close"></span></a>'
);
});
});
});

0 comments on commit 8f20850

Please sign in to comment.