Skip to content

Commit 8d9ff02

Browse files
committed
chore: 1.0.3
1 parent c94c589 commit 8d9ff02

File tree

4 files changed

+52
-25
lines changed

4 files changed

+52
-25
lines changed

packages/server-test-utils/dist/vue-server-test-utils.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1784,8 +1784,8 @@ function warnDeprecated(method, fallback) {
17841784
if ( fallback === void 0 ) fallback = '';
17851785

17861786
if (!testUtils.config.showDeprecationWarnings) { return }
1787-
var msg = method + " is deprecated and will be removed in the next major version";
1788-
if (fallback) { msg += " " + fallback; }
1787+
var msg = method + " is deprecated and will be removed in the next major version.";
1788+
if (fallback) { msg += " " + fallback + "."; }
17891789
warn(msg);
17901790
}
17911791

@@ -2689,7 +2689,10 @@ function mergeOptions(
26892689
var mocks = (getOption(options.mocks, config.mocks));
26902690
var methods = (getOption(options.methods, config.methods));
26912691
if (methods && Object.keys(methods).length) {
2692-
warnDeprecated('overwriting methods via the `methods` property');
2692+
warnDeprecated(
2693+
'overwriting methods via the `methods` property',
2694+
'There is no clear migration path for the `methods` property - Vue does not support arbitrarily replacement of methods, nor should VTU. To stub a complex method extract it from the component and test it in isolation. Otherwise, the suggestion is to rethink those tests'
2695+
);
26932696
}
26942697

26952698
var provide = (getOption(options.provide, config.provide));
@@ -2760,7 +2763,7 @@ function validateOptions(options, component) {
27602763
);
27612764
}
27622765
if ('attachToDocument' in options) {
2763-
warn(
2766+
warnDeprecated(
27642767
"options.attachToDocument is deprecated in favor of options.attachTo and will be removed in a future release"
27652768
);
27662769
}

packages/test-utils/dist/vue-test-utils.iife.js

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1819,8 +1819,8 @@ var VueTestUtils = (function (exports, Vue, vueTemplateCompiler, testUtils) {
18191819
if ( fallback === void 0 ) fallback = '';
18201820

18211821
if (!testUtils.config.showDeprecationWarnings) { return }
1822-
var msg = method + " is deprecated and will be removed in the next major version";
1823-
if (fallback) { msg += " " + fallback; }
1822+
var msg = method + " is deprecated and will be removed in the next major version.";
1823+
if (fallback) { msg += " " + fallback + "."; }
18241824
warn(msg);
18251825
}
18261826

@@ -2991,7 +2991,10 @@ var VueTestUtils = (function (exports, Vue, vueTemplateCompiler, testUtils) {
29912991
var mocks = (getOption(options.mocks, config.mocks));
29922992
var methods = (getOption(options.methods, config.methods));
29932993
if (methods && Object.keys(methods).length) {
2994-
warnDeprecated('overwriting methods via the `methods` property');
2994+
warnDeprecated(
2995+
'overwriting methods via the `methods` property',
2996+
'There is no clear migration path for the `methods` property - Vue does not support arbitrarily replacement of methods, nor should VTU. To stub a complex method extract it from the component and test it in isolation. Otherwise, the suggestion is to rethink those tests'
2997+
);
29952998
}
29962999

29973000
var provide = (getOption(options.provide, config.provide));
@@ -10595,7 +10598,8 @@ var VueTestUtils = (function (exports, Vue, vueTemplateCompiler, testUtils) {
1059510598
Wrapper.prototype.isEmpty = function isEmpty () {
1059610599
warnDeprecated(
1059710600
'isEmpty',
10598-
'Consider a custom matcher such as those provided in jest-dom: https://github.com/testing-library/jest-dom#tobeempty'
10601+
'Consider a custom matcher such as those provided in jest-dom: https://github.com/testing-library/jest-dom#tobeempty. ' +
10602+
'When using with findComponent, access the DOM element with findComponent(Comp).element'
1059910603
);
1060010604
if (!this.vnode) {
1060110605
return this.element.innerHTML === ''
@@ -10624,7 +10628,8 @@ var VueTestUtils = (function (exports, Vue, vueTemplateCompiler, testUtils) {
1062410628
Wrapper.prototype.isVisible = function isVisible () {
1062510629
warnDeprecated(
1062610630
'isVisible',
10627-
"Consider a custom matcher such as those provided in jest-dom: https://github.com/testing-library/jest-dom#tobevisible"
10631+
'Consider a custom matcher such as those provided in jest-dom: https://github.com/testing-library/jest-dom#tobevisible. ' +
10632+
'When using with findComponent, access the DOM element with findComponent(Comp).element'
1062810633
);
1062910634
var element = this.element;
1063010635
while (element) {
@@ -10896,7 +10901,10 @@ var VueTestUtils = (function (exports, Vue, vueTemplateCompiler, testUtils) {
1089610901
Wrapper.prototype.setMethods = function setMethods (methods) {
1089710902
var this$1 = this;
1089810903

10899-
warnDeprecated("setMethods");
10904+
warnDeprecated(
10905+
"setMethods",
10906+
"There is no clear migration path for setMethods - Vue does not support arbitrarily replacement of methods, nor should VTU. To stub a complex method extract it from the component and test it in isolation. Otherwise, the suggestion is to rethink those tests"
10907+
);
1090010908

1090110909
if (!this.vm) {
1090210910
throwError("wrapper.setMethods() can only be called on a Vue instance");
@@ -13779,7 +13787,7 @@ var VueTestUtils = (function (exports, Vue, vueTemplateCompiler, testUtils) {
1377913787
);
1378013788
}
1378113789
if ('attachToDocument' in options) {
13782-
warn(
13790+
warnDeprecated(
1378313791
"options.attachToDocument is deprecated in favor of options.attachTo and will be removed in a future release"
1378413792
);
1378513793
}

packages/test-utils/dist/vue-test-utils.js

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1824,8 +1824,8 @@ function warnDeprecated(method, fallback) {
18241824
if ( fallback === void 0 ) fallback = '';
18251825

18261826
if (!testUtils.config.showDeprecationWarnings) { return }
1827-
var msg = method + " is deprecated and will be removed in the next major version";
1828-
if (fallback) { msg += " " + fallback; }
1827+
var msg = method + " is deprecated and will be removed in the next major version.";
1828+
if (fallback) { msg += " " + fallback + "."; }
18291829
warn(msg);
18301830
}
18311831

@@ -2996,7 +2996,10 @@ function mergeOptions(
29962996
var mocks = (getOption(options.mocks, config.mocks));
29972997
var methods = (getOption(options.methods, config.methods));
29982998
if (methods && Object.keys(methods).length) {
2999-
warnDeprecated('overwriting methods via the `methods` property');
2999+
warnDeprecated(
3000+
'overwriting methods via the `methods` property',
3001+
'There is no clear migration path for the `methods` property - Vue does not support arbitrarily replacement of methods, nor should VTU. To stub a complex method extract it from the component and test it in isolation. Otherwise, the suggestion is to rethink those tests'
3002+
);
30003003
}
30013004

30023005
var provide = (getOption(options.provide, config.provide));
@@ -10600,7 +10603,8 @@ Wrapper.prototype.is = function is (rawSelector) {
1060010603
Wrapper.prototype.isEmpty = function isEmpty () {
1060110604
warnDeprecated(
1060210605
'isEmpty',
10603-
'Consider a custom matcher such as those provided in jest-dom: https://github.com/testing-library/jest-dom#tobeempty'
10606+
'Consider a custom matcher such as those provided in jest-dom: https://github.com/testing-library/jest-dom#tobeempty. ' +
10607+
'When using with findComponent, access the DOM element with findComponent(Comp).element'
1060410608
);
1060510609
if (!this.vnode) {
1060610610
return this.element.innerHTML === ''
@@ -10629,7 +10633,8 @@ Wrapper.prototype.isEmpty = function isEmpty () {
1062910633
Wrapper.prototype.isVisible = function isVisible () {
1063010634
warnDeprecated(
1063110635
'isVisible',
10632-
"Consider a custom matcher such as those provided in jest-dom: https://github.com/testing-library/jest-dom#tobevisible"
10636+
'Consider a custom matcher such as those provided in jest-dom: https://github.com/testing-library/jest-dom#tobevisible. ' +
10637+
'When using with findComponent, access the DOM element with findComponent(Comp).element'
1063310638
);
1063410639
var element = this.element;
1063510640
while (element) {
@@ -10901,7 +10906,10 @@ Wrapper.prototype.setData = function setData (data) {
1090110906
Wrapper.prototype.setMethods = function setMethods (methods) {
1090210907
var this$1 = this;
1090310908

10904-
warnDeprecated("setMethods");
10909+
warnDeprecated(
10910+
"setMethods",
10911+
"There is no clear migration path for setMethods - Vue does not support arbitrarily replacement of methods, nor should VTU. To stub a complex method extract it from the component and test it in isolation. Otherwise, the suggestion is to rethink those tests"
10912+
);
1090510913

1090610914
if (!this.vm) {
1090710915
throwError("wrapper.setMethods() can only be called on a Vue instance");
@@ -13784,7 +13792,7 @@ function validateOptions(options, component) {
1378413792
);
1378513793
}
1378613794
if ('attachToDocument' in options) {
13787-
warn(
13795+
warnDeprecated(
1378813796
"options.attachToDocument is deprecated in favor of options.attachTo and will be removed in a future release"
1378913797
);
1379013798
}

packages/test-utils/dist/vue-test-utils.umd.js

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1822,8 +1822,8 @@
18221822
if ( fallback === void 0 ) fallback = '';
18231823

18241824
if (!testUtils.config.showDeprecationWarnings) { return }
1825-
var msg = method + " is deprecated and will be removed in the next major version";
1826-
if (fallback) { msg += " " + fallback; }
1825+
var msg = method + " is deprecated and will be removed in the next major version.";
1826+
if (fallback) { msg += " " + fallback + "."; }
18271827
warn(msg);
18281828
}
18291829

@@ -2994,7 +2994,10 @@
29942994
var mocks = (getOption(options.mocks, config.mocks));
29952995
var methods = (getOption(options.methods, config.methods));
29962996
if (methods && Object.keys(methods).length) {
2997-
warnDeprecated('overwriting methods via the `methods` property');
2997+
warnDeprecated(
2998+
'overwriting methods via the `methods` property',
2999+
'There is no clear migration path for the `methods` property - Vue does not support arbitrarily replacement of methods, nor should VTU. To stub a complex method extract it from the component and test it in isolation. Otherwise, the suggestion is to rethink those tests'
3000+
);
29983001
}
29993002

30003003
var provide = (getOption(options.provide, config.provide));
@@ -10598,7 +10601,8 @@
1059810601
Wrapper.prototype.isEmpty = function isEmpty () {
1059910602
warnDeprecated(
1060010603
'isEmpty',
10601-
'Consider a custom matcher such as those provided in jest-dom: https://github.com/testing-library/jest-dom#tobeempty'
10604+
'Consider a custom matcher such as those provided in jest-dom: https://github.com/testing-library/jest-dom#tobeempty. ' +
10605+
'When using with findComponent, access the DOM element with findComponent(Comp).element'
1060210606
);
1060310607
if (!this.vnode) {
1060410608
return this.element.innerHTML === ''
@@ -10627,7 +10631,8 @@
1062710631
Wrapper.prototype.isVisible = function isVisible () {
1062810632
warnDeprecated(
1062910633
'isVisible',
10630-
"Consider a custom matcher such as those provided in jest-dom: https://github.com/testing-library/jest-dom#tobevisible"
10634+
'Consider a custom matcher such as those provided in jest-dom: https://github.com/testing-library/jest-dom#tobevisible. ' +
10635+
'When using with findComponent, access the DOM element with findComponent(Comp).element'
1063110636
);
1063210637
var element = this.element;
1063310638
while (element) {
@@ -10899,7 +10904,10 @@
1089910904
Wrapper.prototype.setMethods = function setMethods (methods) {
1090010905
var this$1 = this;
1090110906

10902-
warnDeprecated("setMethods");
10907+
warnDeprecated(
10908+
"setMethods",
10909+
"There is no clear migration path for setMethods - Vue does not support arbitrarily replacement of methods, nor should VTU. To stub a complex method extract it from the component and test it in isolation. Otherwise, the suggestion is to rethink those tests"
10910+
);
1090310911

1090410912
if (!this.vm) {
1090510913
throwError("wrapper.setMethods() can only be called on a Vue instance");
@@ -13782,7 +13790,7 @@
1378213790
);
1378313791
}
1378413792
if ('attachToDocument' in options) {
13785-
warn(
13793+
warnDeprecated(
1378613794
"options.attachToDocument is deprecated in favor of options.attachTo and will be removed in a future release"
1378713795
);
1378813796
}

0 commit comments

Comments
 (0)