Skip to content

Commit 9c717b4

Browse files
committed
Simplified tid and tids helpers.
1 parent 796ef76 commit 9c717b4

File tree

1 file changed

+3
-14
lines changed

1 file changed

+3
-14
lines changed

test/unit/utils/tid.js

+3-14
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,9 @@
1-
import { mount } from '@vue/test-utils';
1+
import { Wrapper, WrapperArray } from '@vue/test-utils';
22

3-
let NoopComponent = {
4-
name: 'noop',
5-
render () {
6-
return null;
7-
}
8-
};
9-
10-
let dummyComponent = mount(NoopComponent);
11-
let VueWrapperPrototype = Object.getPrototypeOf(dummyComponent);
12-
let WrapperPrototype = Object.getPrototypeOf(VueWrapperPrototype);
13-
14-
WrapperPrototype.tid = function (selector) {
3+
Wrapper.prototype.tid = function (selector) {
154
return this.find(`[tid~="${selector}"]`);
165
};
176

18-
WrapperPrototype.tids = function (selector) {
7+
Wrapper.prototype.tids = WrapperArray.prototype = function (selector) {
198
return this.findAll(`[tid~="${selector}"]`);
209
};

0 commit comments

Comments
 (0)