diff --git a/src/components/link/fixtures/link.html b/src/components/link/fixtures/link.html
index 22c223ad357..ffb06b946f6 100644
--- a/src/components/link/fixtures/link.html
+++ b/src/components/link/fixtures/link.html
@@ -22,6 +22,7 @@
disabled>Link
Link
typeof h === 'function')
+ .forEach(handler => {
+ handler(...arguments)
+ })
parent.$root.$emit('clicked::link', evt)
}
diff --git a/src/components/link/link.spec.js b/src/components/link/link.spec.js
index 4f55d7b6976..ba47d7adeb2 100644
--- a/src/components/link/link.spec.js
+++ b/src/components/link/link.spec.js
@@ -90,6 +90,13 @@ describe('link', () => {
expect(firstCallArguments[0]).toBeInstanceOf(Event)
})
+ it('btn with href should invoke click handler when clicked on', async () => {
+ // https://github.com/bootstrap-vue/bootstrap-vue/issues/2938
+ const { app } = window
+ app.$refs.href.click()
+ expect(app.btnHrefClick).toHaveBeenCalled()
+ })
+
it("should emit 'clicked::link' on $root when clicked on", async () => {
const { app } = window
const spy = jest.fn()