style: fix linting errors
Part-of: <https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/2757>
This commit is contained in:
parent
9e2d47f698
commit
7957661573
|
@ -46,7 +46,8 @@ const FILETYPE_COLOR: Record<string, string> = {
|
||||||
|
|
||||||
// NOTE: We're pushing all logs to the end of the event loop
|
// NOTE: We're pushing all logs to the end of the event loop
|
||||||
const createLoggerFn = (level: LogLevel) => {
|
const createLoggerFn = (level: LogLevel) => {
|
||||||
// @ts-expect-error Use console in test environment
|
// NOTE: Use console in test environment
|
||||||
|
// eslint-disable-next-line no-console
|
||||||
if (import.meta.env.VITEST) return console[level]
|
if (import.meta.env.VITEST) return console[level]
|
||||||
|
|
||||||
// NOTE: Don't log time and debug in production environment
|
// NOTE: Don't log time and debug in production environment
|
||||||
|
|
|
@ -4,9 +4,11 @@ import { setupServer } from 'msw/node'
|
||||||
import.meta.env.VUE_APP_INSTANCE_URL = 'http://localhost:3000/'
|
import.meta.env.VUE_APP_INSTANCE_URL = 'http://localhost:3000/'
|
||||||
|
|
||||||
const server = setupServer(
|
const server = setupServer(
|
||||||
// We need to map the urls and remove /api/v1 prefix
|
|
||||||
...handlers.map((handler) => {
|
...handlers.map((handler) => {
|
||||||
|
if (typeof handler.info.path === 'string') {
|
||||||
handler.info.path = handler.info.path.replace('/api/v1', '')
|
handler.info.path = handler.info.path.replace('/api/v1', '')
|
||||||
|
}
|
||||||
|
|
||||||
handler.info.header = handler.info.header.replace('/api/v1', '')
|
handler.info.header = handler.info.header.replace('/api/v1', '')
|
||||||
return handler
|
return handler
|
||||||
})
|
})
|
||||||
|
|
|
@ -20,13 +20,11 @@ const createTrack = <CreateTrackFn>(() => {
|
||||||
return { id: createTrack.id++, uploads: [] } as any as Track
|
return { id: createTrack.id++, uploads: [] } as any as Track
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
beforeAll(() => {
|
beforeAll(() => {
|
||||||
const { initialize } = useTracks()
|
const { initialize } = useTracks()
|
||||||
initialize()
|
initialize()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
describe('cache', () => {
|
describe('cache', () => {
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
createTrack.id = 0
|
createTrack.id = 0
|
||||||
|
@ -37,7 +35,7 @@ describe('cache', () => {
|
||||||
createTrack(),
|
createTrack(),
|
||||||
createTrack(),
|
createTrack(),
|
||||||
createTrack(),
|
createTrack(),
|
||||||
createTrack(),
|
createTrack()
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue