Add simple unit tests for Select component
This commit is contained in:
parent
62f5dd0c30
commit
3b9de2499e
2 changed files with 206 additions and 0 deletions
|
@ -83,3 +83,13 @@ exports.triggerEvent = function(elm, name, ...opts) {
|
|||
|
||||
return elm;
|
||||
};
|
||||
|
||||
/**
|
||||
* Wait for components inner async process, when this.$nextTick is not enough
|
||||
* @param {Function} the condition to verify before calling the callback
|
||||
* @param {Function} the callback to call when condition is true
|
||||
*/
|
||||
exports.waitForIt = function waitForIt(condition, callback) {
|
||||
if (condition()) callback();
|
||||
else setTimeout(() => waitForIt(condition, callback), 50);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue