Skip to content

Commit

Permalink
Adjust matchImageOf to async-await (#92)
Browse files Browse the repository at this point in the history
* Adjust matchImageOf to async-await
  • Loading branch information
Pontus Nyman authored and axelssonHakan committed Nov 15, 2017
1 parent 80d5c47 commit a7fbeb6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/plugins/screenshoter/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ const utils = {
})));
},
matchImageOf(id, folder = '', tolerance = 0.002) {
return this._obj.then((meta) => { // eslint-disable-line no-underscore-dangle
const promise = this._obj.then ? this._obj : Promise.resolve(this._obj); // eslint-disable-line
return promise.then((meta) => {
const imageName = util.format('%s-%s-%s.png', id, meta.platform, meta.browserName);

mkdirp.sync(path.resolve(meta.artifactsPath, 'baseline', folder));
Expand Down

0 comments on commit a7fbeb6

Please sign in to comment.