Skip to content

Commit

Permalink
build: 1.0.0-beta.1
Browse files Browse the repository at this point in the history
  • Loading branch information
eddyerburgh committed Sep 30, 2017
1 parent 21d619d commit ecd3aa1
Show file tree
Hide file tree
Showing 4 changed files with 164 additions and 40 deletions.
51 changes: 41 additions & 10 deletions dist/vue-test-utils.amd.js
Original file line number Diff line number Diff line change
Expand Up @@ -2823,11 +2823,22 @@ WrapperArray.prototype.contains = function contains (selector) {

return this.wrappers.every(function (wrapper) { return wrapper.contains(selector); })
};

WrapperArray.prototype.exists = function exists () {
return this.wrappers.length > 0
};

WrapperArray.prototype.emitted = function emitted () {
this.throwErrorIfWrappersIsEmpty('emitted');

throwError('emitted must be called on a single wrapper, use at(i) to access a wrapper');
};

WrapperArray.prototype.emittedByOrder = function emittedByOrder () {
this.throwErrorIfWrappersIsEmpty('emittedByOrder');

throwError('emittedByOrder must be called on a single wrapper, use at(i) to access a wrapper');
};

WrapperArray.prototype.hasAttribute = function hasAttribute (attribute, value) {
this.throwErrorIfWrappersIsEmpty('hasAttribute');

Expand Down Expand Up @@ -2949,6 +2960,14 @@ ErrorWrapper.prototype.contains = function contains () {
throwError(("find did not return " + (this.selector) + ", cannot call contains() on empty Wrapper"));
};

ErrorWrapper.prototype.emitted = function emitted () {
throwError(("find did not return " + (this.selector) + ", cannot call emitted() on empty Wrapper"));
};

ErrorWrapper.prototype.emittedByOrder = function emittedByOrder () {
throwError(("find did not return " + (this.selector) + ", cannot call emittedByOrder() on empty Wrapper"));
};

ErrorWrapper.prototype.exists = function exists () {
return false
};
Expand Down Expand Up @@ -3054,6 +3073,26 @@ Wrapper.prototype.contains = function contains (selector) {
return false
};

/**
* Returns an object containing custom events emitted by the Wrapper vm
*/
Wrapper.prototype.emitted = function emitted () {
if (!this._emitted && !this.vm) {
throwError('wrapper.emitted() can only be called on a Vue instance');
}
return this._emitted
};

/**
* Returns an Array containing custom events emitted by the Wrapper vm
*/
Wrapper.prototype.emittedByOrder = function emittedByOrder () {
if (!this._emittedByOrder && !this.vm) {
throwError('wrapper.emittedByOrder() can only be called on a Vue instance');
}
return this._emittedByOrder
};

/**
* Utility to check wrapper exists. Returns true as Wrapper always exists
*/
Expand Down Expand Up @@ -3139,7 +3178,7 @@ Wrapper.prototype.hasStyle = function hasStyle (style, value) {

var elStyle = window.getComputedStyle(this.element)[style];
var mockNodeStyle = window.getComputedStyle(mockNode)[style];
return elStyle === mockNodeStyle
return !!(elStyle && mockNodeStyle && elStyle === mockNodeStyle)
};

/**
Expand Down Expand Up @@ -3424,14 +3463,6 @@ var VueWrapper = (function (Wrapper$$1) {
VueWrapper.prototype = Object.create( Wrapper$$1 && Wrapper$$1.prototype );
VueWrapper.prototype.constructor = VueWrapper;

VueWrapper.prototype.emitted = function emitted () {
return this._emitted
};

VueWrapper.prototype.emittedByOrder = function emittedByOrder () {
return this._emittedByOrder
};

return VueWrapper;
}(Wrapper));

Expand Down
51 changes: 41 additions & 10 deletions dist/vue-test-utils.iife.js
Original file line number Diff line number Diff line change
Expand Up @@ -2824,11 +2824,22 @@ WrapperArray.prototype.contains = function contains (selector) {

return this.wrappers.every(function (wrapper) { return wrapper.contains(selector); })
};

WrapperArray.prototype.exists = function exists () {
return this.wrappers.length > 0
};

WrapperArray.prototype.emitted = function emitted () {
this.throwErrorIfWrappersIsEmpty('emitted');

throwError('emitted must be called on a single wrapper, use at(i) to access a wrapper');
};

WrapperArray.prototype.emittedByOrder = function emittedByOrder () {
this.throwErrorIfWrappersIsEmpty('emittedByOrder');

throwError('emittedByOrder must be called on a single wrapper, use at(i) to access a wrapper');
};

WrapperArray.prototype.hasAttribute = function hasAttribute (attribute, value) {
this.throwErrorIfWrappersIsEmpty('hasAttribute');

Expand Down Expand Up @@ -2950,6 +2961,14 @@ ErrorWrapper.prototype.contains = function contains () {
throwError(("find did not return " + (this.selector) + ", cannot call contains() on empty Wrapper"));
};

ErrorWrapper.prototype.emitted = function emitted () {
throwError(("find did not return " + (this.selector) + ", cannot call emitted() on empty Wrapper"));
};

ErrorWrapper.prototype.emittedByOrder = function emittedByOrder () {
throwError(("find did not return " + (this.selector) + ", cannot call emittedByOrder() on empty Wrapper"));
};

ErrorWrapper.prototype.exists = function exists () {
return false
};
Expand Down Expand Up @@ -3055,6 +3074,26 @@ Wrapper.prototype.contains = function contains (selector) {
return false
};

/**
* Returns an object containing custom events emitted by the Wrapper vm
*/
Wrapper.prototype.emitted = function emitted () {
if (!this._emitted && !this.vm) {
throwError('wrapper.emitted() can only be called on a Vue instance');
}
return this._emitted
};

/**
* Returns an Array containing custom events emitted by the Wrapper vm
*/
Wrapper.prototype.emittedByOrder = function emittedByOrder () {
if (!this._emittedByOrder && !this.vm) {
throwError('wrapper.emittedByOrder() can only be called on a Vue instance');
}
return this._emittedByOrder
};

/**
* Utility to check wrapper exists. Returns true as Wrapper always exists
*/
Expand Down Expand Up @@ -3140,7 +3179,7 @@ Wrapper.prototype.hasStyle = function hasStyle (style, value) {

var elStyle = window.getComputedStyle(this.element)[style];
var mockNodeStyle = window.getComputedStyle(mockNode)[style];
return elStyle === mockNodeStyle
return !!(elStyle && mockNodeStyle && elStyle === mockNodeStyle)
};

/**
Expand Down Expand Up @@ -3425,14 +3464,6 @@ var VueWrapper = (function (Wrapper$$1) {
VueWrapper.prototype = Object.create( Wrapper$$1 && Wrapper$$1.prototype );
VueWrapper.prototype.constructor = VueWrapper;

VueWrapper.prototype.emitted = function emitted () {
return this._emitted
};

VueWrapper.prototype.emittedByOrder = function emittedByOrder () {
return this._emittedByOrder
};

return VueWrapper;
}(Wrapper));

Expand Down
51 changes: 41 additions & 10 deletions dist/vue-test-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -294,11 +294,22 @@ WrapperArray.prototype.contains = function contains (selector) {

return this.wrappers.every(function (wrapper) { return wrapper.contains(selector); })
};

WrapperArray.prototype.exists = function exists () {
return this.wrappers.length > 0
};

WrapperArray.prototype.emitted = function emitted () {
this.throwErrorIfWrappersIsEmpty('emitted');

throwError('emitted must be called on a single wrapper, use at(i) to access a wrapper');
};

WrapperArray.prototype.emittedByOrder = function emittedByOrder () {
this.throwErrorIfWrappersIsEmpty('emittedByOrder');

throwError('emittedByOrder must be called on a single wrapper, use at(i) to access a wrapper');
};

WrapperArray.prototype.hasAttribute = function hasAttribute (attribute, value) {
this.throwErrorIfWrappersIsEmpty('hasAttribute');

Expand Down Expand Up @@ -420,6 +431,14 @@ ErrorWrapper.prototype.contains = function contains () {
throwError(("find did not return " + (this.selector) + ", cannot call contains() on empty Wrapper"));
};

ErrorWrapper.prototype.emitted = function emitted () {
throwError(("find did not return " + (this.selector) + ", cannot call emitted() on empty Wrapper"));
};

ErrorWrapper.prototype.emittedByOrder = function emittedByOrder () {
throwError(("find did not return " + (this.selector) + ", cannot call emittedByOrder() on empty Wrapper"));
};

ErrorWrapper.prototype.exists = function exists () {
return false
};
Expand Down Expand Up @@ -525,6 +544,26 @@ Wrapper.prototype.contains = function contains (selector) {
return false
};

/**
* Returns an object containing custom events emitted by the Wrapper vm
*/
Wrapper.prototype.emitted = function emitted () {
if (!this._emitted && !this.vm) {
throwError('wrapper.emitted() can only be called on a Vue instance');
}
return this._emitted
};

/**
* Returns an Array containing custom events emitted by the Wrapper vm
*/
Wrapper.prototype.emittedByOrder = function emittedByOrder () {
if (!this._emittedByOrder && !this.vm) {
throwError('wrapper.emittedByOrder() can only be called on a Vue instance');
}
return this._emittedByOrder
};

/**
* Utility to check wrapper exists. Returns true as Wrapper always exists
*/
Expand Down Expand Up @@ -610,7 +649,7 @@ Wrapper.prototype.hasStyle = function hasStyle (style, value) {

var elStyle = window.getComputedStyle(this.element)[style];
var mockNodeStyle = window.getComputedStyle(mockNode)[style];
return elStyle === mockNodeStyle
return !!(elStyle && mockNodeStyle && elStyle === mockNodeStyle)
};

/**
Expand Down Expand Up @@ -895,14 +934,6 @@ var VueWrapper = (function (Wrapper$$1) {
VueWrapper.prototype = Object.create( Wrapper$$1 && Wrapper$$1.prototype );
VueWrapper.prototype.constructor = VueWrapper;

VueWrapper.prototype.emitted = function emitted () {
return this._emitted
};

VueWrapper.prototype.emittedByOrder = function emittedByOrder () {
return this._emittedByOrder
};

return VueWrapper;
}(Wrapper));

Expand Down
51 changes: 41 additions & 10 deletions dist/vue-test-utils.umd.js
Original file line number Diff line number Diff line change
Expand Up @@ -2827,11 +2827,22 @@ WrapperArray.prototype.contains = function contains (selector) {

return this.wrappers.every(function (wrapper) { return wrapper.contains(selector); })
};

WrapperArray.prototype.exists = function exists () {
return this.wrappers.length > 0
};

WrapperArray.prototype.emitted = function emitted () {
this.throwErrorIfWrappersIsEmpty('emitted');

throwError('emitted must be called on a single wrapper, use at(i) to access a wrapper');
};

WrapperArray.prototype.emittedByOrder = function emittedByOrder () {
this.throwErrorIfWrappersIsEmpty('emittedByOrder');

throwError('emittedByOrder must be called on a single wrapper, use at(i) to access a wrapper');
};

WrapperArray.prototype.hasAttribute = function hasAttribute (attribute, value) {
this.throwErrorIfWrappersIsEmpty('hasAttribute');

Expand Down Expand Up @@ -2953,6 +2964,14 @@ ErrorWrapper.prototype.contains = function contains () {
throwError(("find did not return " + (this.selector) + ", cannot call contains() on empty Wrapper"));
};

ErrorWrapper.prototype.emitted = function emitted () {
throwError(("find did not return " + (this.selector) + ", cannot call emitted() on empty Wrapper"));
};

ErrorWrapper.prototype.emittedByOrder = function emittedByOrder () {
throwError(("find did not return " + (this.selector) + ", cannot call emittedByOrder() on empty Wrapper"));
};

ErrorWrapper.prototype.exists = function exists () {
return false
};
Expand Down Expand Up @@ -3058,6 +3077,26 @@ Wrapper.prototype.contains = function contains (selector) {
return false
};

/**
* Returns an object containing custom events emitted by the Wrapper vm
*/
Wrapper.prototype.emitted = function emitted () {
if (!this._emitted && !this.vm) {
throwError('wrapper.emitted() can only be called on a Vue instance');
}
return this._emitted
};

/**
* Returns an Array containing custom events emitted by the Wrapper vm
*/
Wrapper.prototype.emittedByOrder = function emittedByOrder () {
if (!this._emittedByOrder && !this.vm) {
throwError('wrapper.emittedByOrder() can only be called on a Vue instance');
}
return this._emittedByOrder
};

/**
* Utility to check wrapper exists. Returns true as Wrapper always exists
*/
Expand Down Expand Up @@ -3143,7 +3182,7 @@ Wrapper.prototype.hasStyle = function hasStyle (style, value) {

var elStyle = window.getComputedStyle(this.element)[style];
var mockNodeStyle = window.getComputedStyle(mockNode)[style];
return elStyle === mockNodeStyle
return !!(elStyle && mockNodeStyle && elStyle === mockNodeStyle)
};

/**
Expand Down Expand Up @@ -3428,14 +3467,6 @@ var VueWrapper = (function (Wrapper$$1) {
VueWrapper.prototype = Object.create( Wrapper$$1 && Wrapper$$1.prototype );
VueWrapper.prototype.constructor = VueWrapper;

VueWrapper.prototype.emitted = function emitted () {
return this._emitted
};

VueWrapper.prototype.emittedByOrder = function emittedByOrder () {
return this._emittedByOrder
};

return VueWrapper;
}(Wrapper));

Expand Down

0 comments on commit ecd3aa1

Please sign in to comment.