Skip to content

Commit 0c76cf2

Browse files
committed
build: 1.0.0-beta.8
1 parent 33425c8 commit 0c76cf2

File tree

4 files changed

+32
-16
lines changed

4 files changed

+32
-16
lines changed

dist/vue-test-utils.amd.js

+8-4
Original file line numberDiff line numberDiff line change
@@ -2816,7 +2816,6 @@ function findAllVueComponentsFromVm (vm, components) {
28162816
function findAllVueComponentsFromVnode (vnode, components) {
28172817
if ( components === void 0 ) components = [];
28182818

2819-
debugger
28202819
if (vnode.child) {
28212820
components.push(vnode.child);
28222821
}
@@ -2836,7 +2835,6 @@ function vmCtorMatchesName (vm, name) {
28362835
}
28372836

28382837
function findVueComponents (root, componentName) {
2839-
debugger
28402838
var components = root._isVue ? findAllVueComponentsFromVm(root) : findAllVueComponentsFromVnode(root);
28412839
return components.filter(function (component) {
28422840
if (!component.$vnode) {
@@ -3224,7 +3222,7 @@ Wrapper.prototype.attributes = function attributes () {
32243222
Wrapper.prototype.classes = function classes () {
32253223
var this$1 = this;
32263224

3227-
var classes = [].concat( this.element.classList );
3225+
var classes = this.element.className ? this.element.className.split(' ') : [];
32283226
// Handle converting cssmodules identifiers back to the original class name
32293227
if (this.vm && this.vm.$style) {
32303228
var cssModuleIdentifiers = {};
@@ -3304,6 +3302,8 @@ Wrapper.prototype.exists = function exists () {
33043302
* Checks if wrapper has an attribute with matching value
33053303
*/
33063304
Wrapper.prototype.hasAttribute = function hasAttribute (attribute, value) {
3305+
warn('hasAttribute() has been deprecated and will be removed in version 1.0.0. Use attributes() instead—https://vue-test-utils.vuejs.org/en/api/wrapper/attributes');
3306+
33073307
if (typeof attribute !== 'string') {
33083308
throwError('wrapper.hasAttribute() must be passed attribute as a string');
33093309
}
@@ -3321,6 +3321,7 @@ Wrapper.prototype.hasAttribute = function hasAttribute (attribute, value) {
33213321
Wrapper.prototype.hasClass = function hasClass (className) {
33223322
var this$1 = this;
33233323

3324+
warn('hasClass() has been deprecated and will be removed in version 1.0.0. Use classes() instead—https://vue-test-utils.vuejs.org/en/api/wrapper/classes');
33243325
var targetClass = className;
33253326

33263327
if (typeof targetClass !== 'string') {
@@ -3343,6 +3344,8 @@ Wrapper.prototype.hasClass = function hasClass (className) {
33433344
* Asserts wrapper has a prop name
33443345
*/
33453346
Wrapper.prototype.hasProp = function hasProp (prop, value) {
3347+
warn('hasProp() has been deprecated and will be removed in version 1.0.0. Use props() instead—https://vue-test-utils.vuejs.org/en/api/wrapper/props');
3348+
33463349
if (!this.isVueComponent) {
33473350
throwError('wrapper.hasProp() must be called on a Vue instance');
33483351
}
@@ -4182,7 +4185,8 @@ function createFunctionalComponent (component, mountingOptions) {
41824185
mountingOptions.context || component.FunctionalRenderContext,
41834186
(mountingOptions.context && mountingOptions.context.children && mountingOptions.context.children.map(function (x) { return typeof x === 'function' ? x(h) : x; })) || createFunctionalSlots(mountingOptions.slots, h)
41844187
)
4185-
}
4188+
},
4189+
name: component.name
41864190
}
41874191
}
41884192

dist/vue-test-utils.iife.js

+8-4
Original file line numberDiff line numberDiff line change
@@ -2817,7 +2817,6 @@ function findAllVueComponentsFromVm (vm, components) {
28172817
function findAllVueComponentsFromVnode (vnode, components) {
28182818
if ( components === void 0 ) components = [];
28192819

2820-
debugger
28212820
if (vnode.child) {
28222821
components.push(vnode.child);
28232822
}
@@ -2837,7 +2836,6 @@ function vmCtorMatchesName (vm, name) {
28372836
}
28382837

28392838
function findVueComponents (root, componentName) {
2840-
debugger
28412839
var components = root._isVue ? findAllVueComponentsFromVm(root) : findAllVueComponentsFromVnode(root);
28422840
return components.filter(function (component) {
28432841
if (!component.$vnode) {
@@ -3225,7 +3223,7 @@ Wrapper.prototype.attributes = function attributes () {
32253223
Wrapper.prototype.classes = function classes () {
32263224
var this$1 = this;
32273225

3228-
var classes = [].concat( this.element.classList );
3226+
var classes = this.element.className ? this.element.className.split(' ') : [];
32293227
// Handle converting cssmodules identifiers back to the original class name
32303228
if (this.vm && this.vm.$style) {
32313229
var cssModuleIdentifiers = {};
@@ -3305,6 +3303,8 @@ Wrapper.prototype.exists = function exists () {
33053303
* Checks if wrapper has an attribute with matching value
33063304
*/
33073305
Wrapper.prototype.hasAttribute = function hasAttribute (attribute, value) {
3306+
warn('hasAttribute() has been deprecated and will be removed in version 1.0.0. Use attributes() instead—https://vue-test-utils.vuejs.org/en/api/wrapper/attributes');
3307+
33083308
if (typeof attribute !== 'string') {
33093309
throwError('wrapper.hasAttribute() must be passed attribute as a string');
33103310
}
@@ -3322,6 +3322,7 @@ Wrapper.prototype.hasAttribute = function hasAttribute (attribute, value) {
33223322
Wrapper.prototype.hasClass = function hasClass (className) {
33233323
var this$1 = this;
33243324

3325+
warn('hasClass() has been deprecated and will be removed in version 1.0.0. Use classes() instead—https://vue-test-utils.vuejs.org/en/api/wrapper/classes');
33253326
var targetClass = className;
33263327

33273328
if (typeof targetClass !== 'string') {
@@ -3344,6 +3345,8 @@ Wrapper.prototype.hasClass = function hasClass (className) {
33443345
* Asserts wrapper has a prop name
33453346
*/
33463347
Wrapper.prototype.hasProp = function hasProp (prop, value) {
3348+
warn('hasProp() has been deprecated and will be removed in version 1.0.0. Use props() instead—https://vue-test-utils.vuejs.org/en/api/wrapper/props');
3349+
33473350
if (!this.isVueComponent) {
33483351
throwError('wrapper.hasProp() must be called on a Vue instance');
33493352
}
@@ -4183,7 +4186,8 @@ function createFunctionalComponent (component, mountingOptions) {
41834186
mountingOptions.context || component.FunctionalRenderContext,
41844187
(mountingOptions.context && mountingOptions.context.children && mountingOptions.context.children.map(function (x) { return typeof x === 'function' ? x(h) : x; })) || createFunctionalSlots(mountingOptions.slots, h)
41854188
)
4186-
}
4189+
},
4190+
name: component.name
41874191
}
41884192
}
41894193

dist/vue-test-utils.js

+8-4
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,6 @@ function findAllVueComponentsFromVm (vm, components) {
287287
function findAllVueComponentsFromVnode (vnode, components) {
288288
if ( components === void 0 ) components = [];
289289

290-
debugger
291290
if (vnode.child) {
292291
components.push(vnode.child);
293292
}
@@ -307,7 +306,6 @@ function vmCtorMatchesName (vm, name) {
307306
}
308307

309308
function findVueComponents (root, componentName) {
310-
debugger
311309
var components = root._isVue ? findAllVueComponentsFromVm(root) : findAllVueComponentsFromVnode(root);
312310
return components.filter(function (component) {
313311
if (!component.$vnode) {
@@ -695,7 +693,7 @@ Wrapper.prototype.attributes = function attributes () {
695693
Wrapper.prototype.classes = function classes () {
696694
var this$1 = this;
697695

698-
var classes = [].concat( this.element.classList );
696+
var classes = this.element.className ? this.element.className.split(' ') : [];
699697
// Handle converting cssmodules identifiers back to the original class name
700698
if (this.vm && this.vm.$style) {
701699
var cssModuleIdentifiers = {};
@@ -775,6 +773,8 @@ Wrapper.prototype.exists = function exists () {
775773
* Checks if wrapper has an attribute with matching value
776774
*/
777775
Wrapper.prototype.hasAttribute = function hasAttribute (attribute, value) {
776+
warn('hasAttribute() has been deprecated and will be removed in version 1.0.0. Use attributes() instead—https://vue-test-utils.vuejs.org/en/api/wrapper/attributes');
777+
778778
if (typeof attribute !== 'string') {
779779
throwError('wrapper.hasAttribute() must be passed attribute as a string');
780780
}
@@ -792,6 +792,7 @@ Wrapper.prototype.hasAttribute = function hasAttribute (attribute, value) {
792792
Wrapper.prototype.hasClass = function hasClass (className) {
793793
var this$1 = this;
794794

795+
warn('hasClass() has been deprecated and will be removed in version 1.0.0. Use classes() instead—https://vue-test-utils.vuejs.org/en/api/wrapper/classes');
795796
var targetClass = className;
796797

797798
if (typeof targetClass !== 'string') {
@@ -814,6 +815,8 @@ Wrapper.prototype.hasClass = function hasClass (className) {
814815
* Asserts wrapper has a prop name
815816
*/
816817
Wrapper.prototype.hasProp = function hasProp (prop, value) {
818+
warn('hasProp() has been deprecated and will be removed in version 1.0.0. Use props() instead—https://vue-test-utils.vuejs.org/en/api/wrapper/props');
819+
817820
if (!this.isVueComponent) {
818821
throwError('wrapper.hasProp() must be called on a Vue instance');
819822
}
@@ -1653,7 +1656,8 @@ function createFunctionalComponent (component, mountingOptions) {
16531656
mountingOptions.context || component.FunctionalRenderContext,
16541657
(mountingOptions.context && mountingOptions.context.children && mountingOptions.context.children.map(function (x) { return typeof x === 'function' ? x(h) : x; })) || createFunctionalSlots(mountingOptions.slots, h)
16551658
)
1656-
}
1659+
},
1660+
name: component.name
16571661
}
16581662
}
16591663

dist/vue-test-utils.umd.js

+8-4
Original file line numberDiff line numberDiff line change
@@ -2820,7 +2820,6 @@ function findAllVueComponentsFromVm (vm, components) {
28202820
function findAllVueComponentsFromVnode (vnode, components) {
28212821
if ( components === void 0 ) components = [];
28222822

2823-
debugger
28242823
if (vnode.child) {
28252824
components.push(vnode.child);
28262825
}
@@ -2840,7 +2839,6 @@ function vmCtorMatchesName (vm, name) {
28402839
}
28412840

28422841
function findVueComponents (root, componentName) {
2843-
debugger
28442842
var components = root._isVue ? findAllVueComponentsFromVm(root) : findAllVueComponentsFromVnode(root);
28452843
return components.filter(function (component) {
28462844
if (!component.$vnode) {
@@ -3228,7 +3226,7 @@ Wrapper.prototype.attributes = function attributes () {
32283226
Wrapper.prototype.classes = function classes () {
32293227
var this$1 = this;
32303228

3231-
var classes = [].concat( this.element.classList );
3229+
var classes = this.element.className ? this.element.className.split(' ') : [];
32323230
// Handle converting cssmodules identifiers back to the original class name
32333231
if (this.vm && this.vm.$style) {
32343232
var cssModuleIdentifiers = {};
@@ -3308,6 +3306,8 @@ Wrapper.prototype.exists = function exists () {
33083306
* Checks if wrapper has an attribute with matching value
33093307
*/
33103308
Wrapper.prototype.hasAttribute = function hasAttribute (attribute, value) {
3309+
warn('hasAttribute() has been deprecated and will be removed in version 1.0.0. Use attributes() instead—https://vue-test-utils.vuejs.org/en/api/wrapper/attributes');
3310+
33113311
if (typeof attribute !== 'string') {
33123312
throwError('wrapper.hasAttribute() must be passed attribute as a string');
33133313
}
@@ -3325,6 +3325,7 @@ Wrapper.prototype.hasAttribute = function hasAttribute (attribute, value) {
33253325
Wrapper.prototype.hasClass = function hasClass (className) {
33263326
var this$1 = this;
33273327

3328+
warn('hasClass() has been deprecated and will be removed in version 1.0.0. Use classes() instead—https://vue-test-utils.vuejs.org/en/api/wrapper/classes');
33283329
var targetClass = className;
33293330

33303331
if (typeof targetClass !== 'string') {
@@ -3347,6 +3348,8 @@ Wrapper.prototype.hasClass = function hasClass (className) {
33473348
* Asserts wrapper has a prop name
33483349
*/
33493350
Wrapper.prototype.hasProp = function hasProp (prop, value) {
3351+
warn('hasProp() has been deprecated and will be removed in version 1.0.0. Use props() instead—https://vue-test-utils.vuejs.org/en/api/wrapper/props');
3352+
33503353
if (!this.isVueComponent) {
33513354
throwError('wrapper.hasProp() must be called on a Vue instance');
33523355
}
@@ -4186,7 +4189,8 @@ function createFunctionalComponent (component, mountingOptions) {
41864189
mountingOptions.context || component.FunctionalRenderContext,
41874190
(mountingOptions.context && mountingOptions.context.children && mountingOptions.context.children.map(function (x) { return typeof x === 'function' ? x(h) : x; })) || createFunctionalSlots(mountingOptions.slots, h)
41884191
)
4189-
}
4192+
},
4193+
name: component.name
41904194
}
41914195
}
41924196

0 commit comments

Comments
 (0)