This file contains hidden or 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
function findElement(element, vnode = null) { | |
if (vnode) { | |
return vnode.context.$refs[element]; | |
} | |
return document.querySelector(`#${element}`); | |
} | |
function elementContainsEvent(event, element, vnode = null) { | |
const domElement = findElement(element, vnode); | |
return domElement && domElement.contains(event.target); |
This file contains hidden or 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
<?php | |
/** | |
* Paystack payment service. | |
*/ | |
namespace App\Payments; | |
use GuzzleHttp\Client; | |
use Illuminate\Support\Facades\Log; |
This file contains hidden or 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
const chai = require('chai'); | |
const chaiHttp = require('chai-http'); | |
const app = require('../../index'); | |
const { User, Contact } = require('../../database/models'); | |
chai.use(chaiHttp); | |
const should = chai.should(); | |
let userData, contactData, user, token, otherUserData, otherUser; |
This file contains hidden or 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
/** | |
* Handles application errors | |
*/ | |
class ErrorHandler { | |
/** | |
* Wrapper for catching async/await errors | |
* @param {function} fn | |
* @returns {function} [Composed function with error handler attached] | |
*/ | |
static catchErrors(fn) { |