mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
Fix lint
This commit is contained in:
parent
1e4fad8425
commit
366c5d776b
@ -1,5 +1,5 @@
|
|||||||
const validURL = str => {
|
const validURL = str => {
|
||||||
const isValid = str.match(/^(?:https?:\/\/)(?:[^@\n])?(?:www\.)?([^:\/\n?]+)/g)
|
const isValid = str.match(/^(?:https?:\/\/)(?:[^@\n])?(?:www\.)?([^:/\n?]+)/g)
|
||||||
return !!isValid
|
return !!isValid
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -15,4 +15,4 @@ export default {
|
|||||||
return socialMedia
|
return socialMedia
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -25,7 +25,7 @@ describe('CreateSocialMedia', () => {
|
|||||||
password: '1234'
|
password: '1234'
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
afterEach(async () => {
|
afterEach(async () => {
|
||||||
await factory.cleanDatabase()
|
await factory.cleanDatabase()
|
||||||
})
|
})
|
||||||
@ -46,4 +46,4 @@ describe('CreateSocialMedia', () => {
|
|||||||
await expect(client.request(mutation, variables)).rejects.toThrow('Input is not a URL')
|
await expect(client.request(mutation, variables)).rejects.toThrow('Input is not a URL')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@ -309,4 +309,3 @@ describe('change password', () => {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import faker from 'faker'
|
import faker from 'faker'
|
||||||
import uuid from 'uuid/v4'
|
import uuid from 'uuid/v4'
|
||||||
|
|
||||||
export default function create(params) {
|
export default function create (params) {
|
||||||
const {
|
const {
|
||||||
id = uuid(),
|
id = uuid(),
|
||||||
name = faker.name.findName(),
|
name = faker.name.findName(),
|
||||||
|
|||||||
@ -11,7 +11,6 @@ import { getDriver } from './bootstrap/neo4j'
|
|||||||
import helmet from 'helmet'
|
import helmet from 'helmet'
|
||||||
import decode from './jwt/decode'
|
import decode from './jwt/decode'
|
||||||
|
|
||||||
|
|
||||||
dotenv.config()
|
dotenv.config()
|
||||||
// check env and warn
|
// check env and warn
|
||||||
const requiredEnvVars = ['MAPBOX_TOKEN', 'JWT_SECRET', 'PRIVATE_KEY_PASSPHRASE']
|
const requiredEnvVars = ['MAPBOX_TOKEN', 'JWT_SECRET', 'PRIVATE_KEY_PASSPHRASE']
|
||||||
|
|||||||
@ -26,7 +26,9 @@ describe('my-social-media.vue', () => {
|
|||||||
mutate: jest
|
mutate: jest
|
||||||
.fn()
|
.fn()
|
||||||
.mockRejectedValue({ message: 'Ouch!' })
|
.mockRejectedValue({ message: 'Ouch!' })
|
||||||
.mockResolvedValueOnce({ data: { CreateSocialMeda: { id: 's1', url: socialMediaUrl } }})
|
.mockResolvedValueOnce({
|
||||||
|
data: { CreateSocialMeda: { id: 's1', url: socialMediaUrl } }
|
||||||
|
})
|
||||||
},
|
},
|
||||||
$toast: {
|
$toast: {
|
||||||
error: jest.fn(),
|
error: jest.fn(),
|
||||||
@ -58,9 +60,7 @@ describe('my-social-media.vue', () => {
|
|||||||
getters = {
|
getters = {
|
||||||
'auth/user': () => {
|
'auth/user': () => {
|
||||||
return {
|
return {
|
||||||
socialMedia: [
|
socialMedia: [{ id: 's1', url: socialMediaUrl }]
|
||||||
{ id: 's1', url: socialMediaUrl }
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user