Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import FactoryGuy from 'ember-data-factory-guy';
FactoryGuy.define('track', {
sequences: {
title: function(num) {
return 'track' + num;
},
artist: function(num) {
return 'artist' + num;
}
},
default: {
title: FactoryGuy.generate('title'),
artist: FactoryGuy.generate('artist'),
_audioMeta: {},
_echonestTrack: {},
},
traits: {
'withoutAudioMeta': {
_audioMeta: null,
_echonestTrack: null,
},
'withSmallS3Url': {
title: 'royals:s3',
s3Url: 'songs/08042d60-c4d7-4014-bce1-f05e93340a1f.mp3',
},
]
return items[num % items.length]
},
itemType: (num) => {
let items = [
'a',
'b',
'c',
'd'
]
return items[num % items.length]
}
},
default: {
label: FactoryGuy.generate('label'),
itemType: FactoryGuy.generate('itemType')
}
})
return items[num % items.length]
},
itemType: (num) => {
let items = [
'a',
'b',
'c',
'd'
]
return items[num % items.length]
}
},
default: {
label: FactoryGuy.generate('label'),
itemType: FactoryGuy.generate('itemType')
}
})
import FactoryGuy from 'ember-data-factory-guy';
FactoryGuy.define('track', {
sequences: {
title: function(num) {
return 'track' + num;
},
artist: function(num) {
return 'artist' + num;
}
},
default: {
title: FactoryGuy.generate('title'),
artist: FactoryGuy.generate('artist'),
_audioMeta: {},
_echonestTrack: {},
},
traits: {
'withoutAudioMeta': {
_audioMeta: null,
_echonestTrack: null,
},
'withSmallS3Url': {
title: 'royals:s3',
s3Url: 'songs/08042d60-c4d7-4014-bce1-f05e93340a1f.mp3',
},
'withLocalFile': {