diff --git a/packages/test-utils/src/matches.js b/packages/test-utils/src/matches.js
index 959613472..477d66cd1 100644
--- a/packages/test-utils/src/matches.js
+++ b/packages/test-utils/src/matches.js
@@ -56,7 +56,14 @@ export function matches(node, selector) {
return element && element.matches && element.matches(selector.value)
}
- const componentInstance = node[FUNCTIONAL_OPTIONS] || node.child
+ const isFunctionalSelector = isConstructor(selector.value)
+ ? selector.value.options.functional
+ : selector.value.functional
+
+ const componentInstance =
+ (isFunctionalSelector ? node[FUNCTIONAL_OPTIONS] : node.child) ||
+ node[FUNCTIONAL_OPTIONS] ||
+ node.child
if (!componentInstance) {
return false
diff --git a/test/specs/create-local-vue.spec.js b/test/specs/create-local-vue.spec.js
index a45e88c7c..44412811b 100644
--- a/test/specs/create-local-vue.spec.js
+++ b/test/specs/create-local-vue.spec.js
@@ -67,7 +67,7 @@ describeWithShallowAndMount('createLocalVue', mountingMethod => {
})
itDoNotRunIf(
- mountingMethod.name === 'shallowMount',
+ mountingMethod.name === 'shallowMount' || vueVersion < 2.6,
'Router should work properly with local Vue',
async () => {
const localVue = createLocalVue()
diff --git a/test/specs/wrapper/find.spec.js b/test/specs/wrapper/find.spec.js
index d8412ba8a..e854d678b 100644
--- a/test/specs/wrapper/find.spec.js
+++ b/test/specs/wrapper/find.spec.js
@@ -1,6 +1,7 @@
import { compileToFunctions } from 'vue-template-compiler'
-import { createLocalVue } from 'packages/test-utils/src'
+import { createLocalVue, shallowMount } from 'packages/test-utils/src'
import Vue from 'vue'
+import VueRouter from 'vue-router'
import ComponentWithChild from '~resources/components/component-with-child.vue'
import ComponentWithoutName from '~resources/components/component-without-name.vue'
import ComponentWithSlots from '~resources/components/component-with-slots.vue'
@@ -17,6 +18,58 @@ import {
import { itDoNotRunIf, itSkipIf } from 'conditional-specs'
describeWithShallowAndMount('find', mountingMethod => {
+ itDoNotRunIf(
+ mountingMethod.name === 'shallowMount',
+ 'returns a VueWrapper using a