Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9c717b4

Browse filesBrowse files
committed
Simplified tid and tids helpers.
1 parent 796ef76 commit 9c717b4
Copy full SHA for 9c717b4

File tree

Expand file treeCollapse file tree

1 file changed

+3
-14
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-14
lines changed

‎test/unit/utils/tid.js

Copy file name to clipboard
+3-14Lines changed: 3 additions & 14 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.