This commit is contained in:
Matt Rider 2019-04-11 22:28:18 -03:00
parent 1e4fad8425
commit 366c5d776b
6 changed files with 9 additions and 11 deletions

View File

@ -1,5 +1,5 @@
const validURL = str => {
const isValid = str.match(/^(?:https?:\/\/)(?:[^@\n])?(?:www\.)?([^:\/\n?]+)/g)
const isValid = str.match(/^(?:https?:\/\/)(?:[^@\n])?(?:www\.)?([^:/\n?]+)/g)
return !!isValid
}

View File

@ -309,4 +309,3 @@ describe('change password', () => {
})
})
})

View File

@ -1,7 +1,7 @@
import faker from 'faker'
import uuid from 'uuid/v4'
export default function create(params) {
export default function create (params) {
const {
id = uuid(),
name = faker.name.findName(),

View File

@ -11,7 +11,6 @@ import { getDriver } from './bootstrap/neo4j'
import helmet from 'helmet'
import decode from './jwt/decode'
dotenv.config()
// check env and warn
const requiredEnvVars = ['MAPBOX_TOKEN', 'JWT_SECRET', 'PRIVATE_KEY_PASSPHRASE']

View File

@ -26,7 +26,9 @@ describe('my-social-media.vue', () => {
mutate: jest
.fn()
.mockRejectedValue({ message: 'Ouch!' })
.mockResolvedValueOnce({ data: { CreateSocialMeda: { id: 's1', url: socialMediaUrl } }})
.mockResolvedValueOnce({
data: { CreateSocialMeda: { id: 's1', url: socialMediaUrl } }
})
},
$toast: {
error: jest.fn(),
@ -58,9 +60,7 @@ describe('my-social-media.vue', () => {
getters = {
'auth/user': () => {
return {
socialMedia: [
{ id: 's1', url: socialMediaUrl }
]
socialMedia: [{ id: 's1', url: socialMediaUrl }]
}
}
}