mirror of
https://github.com/koel/koel
synced 2024-11-24 21:23:06 +00:00
chore(test): clean up factories
This commit is contained in:
parent
6a2e977138
commit
cc907926ef
7 changed files with 12 additions and 13 deletions
|
@ -1,18 +1,17 @@
|
||||||
import { Faker } from '@faker-js/faker'
|
|
||||||
import factory from 'factoria'
|
import factory from 'factoria'
|
||||||
import artist from './artist'
|
import artistFactory from './artistFactory'
|
||||||
import album from './album'
|
import albumFactory from './albumFactory'
|
||||||
import song from './song'
|
import songFactory from './songFactory'
|
||||||
import video from './video'
|
import playlistFactory from './playlistFactory'
|
||||||
import playlist from './playlist'
|
import userFactory, { states as userStates } from './userFactory'
|
||||||
import user, { states as userStates } from './user'
|
import youTubeVideoFactory from './youTubeVideoFactory'
|
||||||
|
|
||||||
factory
|
factory
|
||||||
.define('artist', (faker: Faker): Artist => artist(faker))
|
.define('artist', faker => artistFactory(faker))
|
||||||
.define('album', (faker: Faker): Album => album(faker))
|
.define('album', faker => albumFactory(faker))
|
||||||
.define('song', (faker: Faker): Song => song(faker))
|
.define('song', faker => songFactory(faker))
|
||||||
.define('video', (faker: Faker): YouTubeVideo => video(faker))
|
.define('video', faker => youTubeVideoFactory(faker))
|
||||||
.define('playlist', (faker: Faker): Playlist => playlist(faker))
|
.define('playlist', faker => playlistFactory(faker))
|
||||||
.define('user', (faker: Faker): User => user(faker), userStates)
|
.define('user', faker => userFactory(faker), userStates)
|
||||||
|
|
||||||
export default factory
|
export default factory
|
||||||
|
|
Loading…
Reference in a new issue