Add tests for 1807

This commit is contained in:
Sergio Crisostomo 2017-09-08 22:42:18 +02:00
parent 364aac0217
commit a8707afa20
2 changed files with 87 additions and 1 deletions

View file

@ -103,3 +103,13 @@ exports.waitForIt = function waitForIt(condition, callback) {
if (condition()) callback();
else setTimeout(() => waitForIt(condition, callback), 50);
};
/**
* Call a components .$nextTick in a promissified way
* @param {Vue Component} the component to work with
*/
exports.promissedTick = component => {
return new Promise((resolve, reject) => {
component.$nextTick(resolve);
});
};