This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function main(){ | |
const response = await getJson('sone/endpoint') // vzimame vsi4ko | |
const finalResult = await response.reduce((promiseChain, currentItem) => { | |
return promiseChain.then(results => { | |
return screenShotAndCompare(currentItem) | |
}) | |
}, Promise.resolve()) | |
// Tuk ve4e sme gotovi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Pusher from 'pusher-js' | |
Pusher.logToConsole = process.env.NODE_ENV === 'development' | |
export const PusherService = new Pusher(process.env.PUSHER_KEY, { | |
cluster: 'eu', | |
encrypted: true | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Transform an array of messages from laravel error message bag to be a single html string with breaks | |
* @param {Object | Array | String} message | |
* @example | |
* message = { username: ['some error', 'maybe another error'], email: ['another error', 'and another error']} | |
* message = { username: 'some error', email: 'and another error'} | |
* message = ['some error', 'and another error'] | |
* message = [['some error'], ['and another error']] | |
* message = 'some error' | |
* @return { String } |
NewerOlder