lint fix
This commit is contained in:
parent
c574606f0c
commit
4a49e9118e
|
@ -74,7 +74,7 @@ export const actions = times(30, i => ({
|
|||
{
|
||||
user: 'foobar',
|
||||
post: {
|
||||
text: "content warning",
|
||||
text: 'content warning',
|
||||
spoiler: 'CW'
|
||||
}
|
||||
},
|
||||
|
|
|
@ -15,7 +15,7 @@ global.File = FileApi.File
|
|||
global.FormData = FileApi.FormData
|
||||
global.fetch = fetch
|
||||
|
||||
async function submitMedia(accessToken, filename, alt) {
|
||||
async function submitMedia (accessToken, filename, alt) {
|
||||
let form = new FormData()
|
||||
form.append('file', fs.createReadStream(path.join(__dirname, '../tests/images/' + filename)))
|
||||
form.append('description', alt)
|
||||
|
|
|
@ -34,7 +34,7 @@ async function cloneMastodon () {
|
|||
}
|
||||
}
|
||||
|
||||
async function setupMastodonDatabase() {
|
||||
async function setupMastodonDatabase () {
|
||||
console.log('Setting up mastodon database...')
|
||||
try {
|
||||
await exec('dropdb mastodon_development', {cwd: mastodonDir})
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
import { postWithTimeout } from '../_utils/ajax'
|
||||
import { auth, basename } from './utils'
|
||||
|
||||
export async function followAccount(instanceName, accessToken, accountId) {
|
||||
export async function followAccount (instanceName, accessToken, accountId) {
|
||||
let url = `${basename(instanceName)}/api/v1/accounts/${accountId}/follow`
|
||||
return postWithTimeout(url, null, auth(accessToken))
|
||||
}
|
||||
|
||||
export async function unfollowAccount(instanceName, accessToken, accountId) {
|
||||
export async function unfollowAccount (instanceName, accessToken, accountId) {
|
||||
let url = `${basename(instanceName)}/api/v1/accounts/${accountId}/unfollow`
|
||||
return postWithTimeout(url, null, auth(accessToken))
|
||||
}
|
|
@ -1,8 +1,7 @@
|
|||
import { favoriteStatus } from '../routes/_api/favorite'
|
||||
import fetch from 'node-fetch'
|
||||
global.fetch = fetch
|
||||
|
||||
import { users } from './users'
|
||||
global.fetch = fetch
|
||||
|
||||
export async function favoriteStatusAsAdmin (statusId) {
|
||||
return favoriteStatus('localhost:3000', users.admin.accessToken, statusId)
|
||||
|
|
|
@ -12,7 +12,7 @@ test('shows favorites', async t => {
|
|||
.expect(getFavoritesCount()).eql(2)
|
||||
.expect($('.icon-button[aria-label="Favorite"]').getAttribute('aria-pressed')).eql('true')
|
||||
.click($('.status-favs-reblogs').nth(1))
|
||||
.expect(getUrl()).match(/\/statuses\/[^\/]+\/favorites/)
|
||||
.expect(getUrl()).match(/\/statuses\/[^/]+\/favorites/)
|
||||
.expect($('.search-result-account-name').nth(0).innerText).eql('foobar')
|
||||
.expect($('.search-result-account-username').nth(0).innerText).eql('@foobar')
|
||||
.expect($('.search-result-account-name').nth(1).innerText).eql('admin')
|
||||
|
@ -26,7 +26,7 @@ test('shows boosts', async t => {
|
|||
.expect(getReblogsCount()).eql(1)
|
||||
.expect($('.icon-button[aria-label="Boost"]').getAttribute('aria-pressed')).eql('false')
|
||||
.click($('.status-favs-reblogs').nth(0))
|
||||
.expect(getUrl()).match(/\/statuses\/[^\/]+\/reblogs/)
|
||||
.expect(getUrl()).match(/\/statuses\/[^/]+\/reblogs/)
|
||||
.expect($('.search-result-account-name').nth(0).innerText).eql('admin')
|
||||
.expect($('.search-result-account-username').nth(0).innerText).eql('@admin')
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue