diff --git a/packages/server-test-utils/dist/vue-server-test-utils.js b/packages/server-test-utils/dist/vue-server-test-utils.js index fb4047fce..c5ced466a 100644 --- a/packages/server-test-utils/dist/vue-server-test-utils.js +++ b/packages/server-test-utils/dist/vue-server-test-utils.js @@ -1784,7 +1784,7 @@ function warnDeprecated(method, fallback) { if ( fallback === void 0 ) fallback = ''; if (!testUtils.config.showDeprecationWarnings) { return } - var msg = method + " is deprecated and will removed in the next major version"; + var msg = method + " is deprecated and will be removed in the next major version"; if (fallback) { msg += " " + fallback; } warn(msg); } diff --git a/packages/test-utils/dist/vue-test-utils.iife.js b/packages/test-utils/dist/vue-test-utils.iife.js index 7a91531d1..ba49386f9 100644 --- a/packages/test-utils/dist/vue-test-utils.iife.js +++ b/packages/test-utils/dist/vue-test-utils.iife.js @@ -1819,7 +1819,7 @@ var VueTestUtils = (function (exports, Vue, vueTemplateCompiler, testUtils) { if ( fallback === void 0 ) fallback = ''; if (!testUtils.config.showDeprecationWarnings) { return } - var msg = method + " is deprecated and will removed in the next major version"; + var msg = method + " is deprecated and will be removed in the next major version"; if (fallback) { msg += " " + fallback; } warn(msg); } @@ -10393,7 +10393,7 @@ var VueTestUtils = (function (exports, Vue, vueTemplateCompiler, testUtils) { * Calls destroy on vm */ Wrapper.prototype.destroy = function destroy () { - if (!this.isVueInstance() && !this.isFunctionalComponent) { + if (!this.vm && !this.isFunctionalComponent) { throwError( "wrapper.destroy() can only be called on a Vue instance or " + "functional component." @@ -10404,7 +10404,7 @@ var VueTestUtils = (function (exports, Vue, vueTemplateCompiler, testUtils) { this.element.parentNode.removeChild(this.element); } - if (this.isVueInstance()) { + if (this.vm) { // $FlowIgnore this.vm.$destroy(); throwIfInstancesThrew(this.vm); @@ -10623,7 +10623,7 @@ var VueTestUtils = (function (exports, Vue, vueTemplateCompiler, testUtils) { */ Wrapper.prototype.isVisible = function isVisible () { warnDeprecated( - 'isEmpty', + 'isVisible', "Consider a custom matcher such as those provided in jest-dom: https://github.com/testing-library/jest-dom#tobevisible" ); var element = this.element; @@ -10683,7 +10683,7 @@ var VueTestUtils = (function (exports, Vue, vueTemplateCompiler, testUtils) { warnDeprecated("overview"); - if (!this.isVueInstance()) { + if (!this.vm) { throwError("wrapper.overview() can only be called on a Vue instance"); } @@ -10794,11 +10794,6 @@ var VueTestUtils = (function (exports, Vue, vueTemplateCompiler, testUtils) { Wrapper.prototype.setChecked = function setChecked (checked) { if ( checked === void 0 ) checked = true; - warnDeprecated( - "setChecked", - 'When you migrate to VTU 2, use setValue instead.' - ); - if (typeof checked !== 'boolean') { throwError('wrapper.setChecked() must be passed a boolean'); } @@ -10846,11 +10841,6 @@ var VueTestUtils = (function (exports, Vue, vueTemplateCompiler, testUtils) { * @deprecated */ Wrapper.prototype.setSelected = function setSelected () { - warnDeprecated( - "setSelected", - 'When you migrate to VTU 2, use setValue instead.' - ); - var tagName = this.element.tagName; if (tagName === 'SELECT') { @@ -10908,7 +10898,7 @@ var VueTestUtils = (function (exports, Vue, vueTemplateCompiler, testUtils) { warnDeprecated("setMethods"); - if (!this.isVueInstance()) { + if (!this.vm) { throwError("wrapper.setMethods() can only be called on a Vue instance"); } Object.keys(methods).forEach(function (key) { diff --git a/packages/test-utils/dist/vue-test-utils.js b/packages/test-utils/dist/vue-test-utils.js index c198f0a2c..d2aa9e744 100644 --- a/packages/test-utils/dist/vue-test-utils.js +++ b/packages/test-utils/dist/vue-test-utils.js @@ -1824,7 +1824,7 @@ function warnDeprecated(method, fallback) { if ( fallback === void 0 ) fallback = ''; if (!testUtils.config.showDeprecationWarnings) { return } - var msg = method + " is deprecated and will removed in the next major version"; + var msg = method + " is deprecated and will be removed in the next major version"; if (fallback) { msg += " " + fallback; } warn(msg); } @@ -10398,7 +10398,7 @@ Wrapper.prototype.contains = function contains (rawSelector) { * Calls destroy on vm */ Wrapper.prototype.destroy = function destroy () { - if (!this.isVueInstance() && !this.isFunctionalComponent) { + if (!this.vm && !this.isFunctionalComponent) { throwError( "wrapper.destroy() can only be called on a Vue instance or " + "functional component." @@ -10409,7 +10409,7 @@ Wrapper.prototype.destroy = function destroy () { this.element.parentNode.removeChild(this.element); } - if (this.isVueInstance()) { + if (this.vm) { // $FlowIgnore this.vm.$destroy(); throwIfInstancesThrew(this.vm); @@ -10628,7 +10628,7 @@ Wrapper.prototype.isEmpty = function isEmpty () { */ Wrapper.prototype.isVisible = function isVisible () { warnDeprecated( - 'isEmpty', + 'isVisible', "Consider a custom matcher such as those provided in jest-dom: https://github.com/testing-library/jest-dom#tobevisible" ); var element = this.element; @@ -10688,7 +10688,7 @@ Wrapper.prototype.overview = function overview () { warnDeprecated("overview"); - if (!this.isVueInstance()) { + if (!this.vm) { throwError("wrapper.overview() can only be called on a Vue instance"); } @@ -10799,11 +10799,6 @@ Wrapper.prototype.props = function props (key) { Wrapper.prototype.setChecked = function setChecked (checked) { if ( checked === void 0 ) checked = true; - warnDeprecated( - "setChecked", - 'When you migrate to VTU 2, use setValue instead.' - ); - if (typeof checked !== 'boolean') { throwError('wrapper.setChecked() must be passed a boolean'); } @@ -10851,11 +10846,6 @@ Wrapper.prototype.setChecked = function setChecked (checked) { * @deprecated */ Wrapper.prototype.setSelected = function setSelected () { - warnDeprecated( - "setSelected", - 'When you migrate to VTU 2, use setValue instead.' - ); - var tagName = this.element.tagName; if (tagName === 'SELECT') { @@ -10913,7 +10903,7 @@ Wrapper.prototype.setMethods = function setMethods (methods) { warnDeprecated("setMethods"); - if (!this.isVueInstance()) { + if (!this.vm) { throwError("wrapper.setMethods() can only be called on a Vue instance"); } Object.keys(methods).forEach(function (key) { diff --git a/packages/test-utils/dist/vue-test-utils.umd.js b/packages/test-utils/dist/vue-test-utils.umd.js index f2a828daf..49b158a45 100644 --- a/packages/test-utils/dist/vue-test-utils.umd.js +++ b/packages/test-utils/dist/vue-test-utils.umd.js @@ -1822,7 +1822,7 @@ if ( fallback === void 0 ) fallback = ''; if (!testUtils.config.showDeprecationWarnings) { return } - var msg = method + " is deprecated and will removed in the next major version"; + var msg = method + " is deprecated and will be removed in the next major version"; if (fallback) { msg += " " + fallback; } warn(msg); } @@ -10396,7 +10396,7 @@ * Calls destroy on vm */ Wrapper.prototype.destroy = function destroy () { - if (!this.isVueInstance() && !this.isFunctionalComponent) { + if (!this.vm && !this.isFunctionalComponent) { throwError( "wrapper.destroy() can only be called on a Vue instance or " + "functional component." @@ -10407,7 +10407,7 @@ this.element.parentNode.removeChild(this.element); } - if (this.isVueInstance()) { + if (this.vm) { // $FlowIgnore this.vm.$destroy(); throwIfInstancesThrew(this.vm); @@ -10626,7 +10626,7 @@ */ Wrapper.prototype.isVisible = function isVisible () { warnDeprecated( - 'isEmpty', + 'isVisible', "Consider a custom matcher such as those provided in jest-dom: https://github.com/testing-library/jest-dom#tobevisible" ); var element = this.element; @@ -10686,7 +10686,7 @@ warnDeprecated("overview"); - if (!this.isVueInstance()) { + if (!this.vm) { throwError("wrapper.overview() can only be called on a Vue instance"); } @@ -10797,11 +10797,6 @@ Wrapper.prototype.setChecked = function setChecked (checked) { if ( checked === void 0 ) checked = true; - warnDeprecated( - "setChecked", - 'When you migrate to VTU 2, use setValue instead.' - ); - if (typeof checked !== 'boolean') { throwError('wrapper.setChecked() must be passed a boolean'); } @@ -10849,11 +10844,6 @@ * @deprecated */ Wrapper.prototype.setSelected = function setSelected () { - warnDeprecated( - "setSelected", - 'When you migrate to VTU 2, use setValue instead.' - ); - var tagName = this.element.tagName; if (tagName === 'SELECT') { @@ -10911,7 +10901,7 @@ warnDeprecated("setMethods"); - if (!this.isVueInstance()) { + if (!this.vm) { throwError("wrapper.setMethods() can only be called on a Vue instance"); } Object.keys(methods).forEach(function (key) {