Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return `user${i}`;
},
name: function(i) {
return `User ${i}`;
},
// needs to be the actual related model name for Ember Data reasons? 🤔
type: 'github-user',
avatar_url: function(i) {
return `user${i}-avatar.gif`;
},
public_repos: 1,
public_gists: 2,
followers: 3,
following: 4,
created_at: faker.date.past(),
updated_at: faker.date.recent(),
repos_url: function(i) {
return `https://api.github.com/users/user${i}/repos`;
},
url: function(i) {
return `https://api.github.com/users/user${i}`;
},
withRepositories: trait({
afterCreate(user) {
server.createList('githubRepository', 2, { owner: user });
}
}),
});
it('should pass correct dueDate data', () => {
const dueDate = {
selectedDate: faker.date.future(),
};
const validation = validateDueDate(true, dueDate);
expect(validation).toEqual(true);
});
});
dateRegistered: () => faker.date.past(1),
pendingRegistrationApproval: false,
before(function(done) {
User
.createEach([{
email: _email,
username: faker.internet.userName(),
birthday: faker.date.past()
}, {
email: __email,
username: faker.internet.userName(),
birthday: faker.date.past()
}])
.exec(done);
});
function generateTestDoc(){
return {
firstName: faker.name.firstName(),
lastName: faker.name.lastName(),
isFriend: faker.random.boolean(),
id: faker.random.uuid(),
creationOrder: faker.random.number(),
creationDate: faker.date.past(),
messages: (function(){var a = []; var n = faker.random.number({max: 5}); for (var i = 0; i < n; i++) a.push(faker.lorem.sentence()); return a;})()
};
}
_.times(5, (index) => (
<span>
{ faker.company.catchPhrase() }
</span>
<progress style="{{height:" value="{">
{ faker.date.weekday() }, 12 { faker.date.month() }, 2018
{ faker.date.weekday() }, 12 { faker.date.month() }, 2018
<button color="secondary">
<i></i>
</button>
<button color="secondary">
<i></i>
</button>
))</progress>
<span>
-
</span>
<div>
{ faker.address.city() }
</div>
<span>
{ faker.address.state() }, { faker.address.country() }
</span>
{ faker.date.weekday() }, 12 { faker.date.month() }, 2018<br>
12:34 PM
<a id="UncontrolledTooltipRevoke" href="#">
<i></i>
</a>
Revoke
))
}
const politicalView = unionized
? r.pick(["red", "green"])
: r.pick(["red", "green", "center", "right", "fascist"]);
return {
get age() {
const d = DateTime.fromJSDate(this.birthDay);
const now = DateTime.local();
const diff = now.diff(d, "years").toObject();
return diff.years;
},
id: uuid(),
firstName: faker.name.firstName(),
lastName: faker.name.lastName(),
birthDay: faker.date.past(70, "1999-01-01"),
gender: r.pick(["m", "f"]),
handedness: r.pick(["l", "r"]),
salary: r.integer(2000, 10000),
email: faker.internet.email(),
unionized,
politicalView,
relatedToCEO: r.pick([
true,
false,
false,
false,
false,
false,
false,
false
])
.map((_, index) => ({
id: index,
protocolId: '',
createdAt: timestamp(_faker.date.recent()),
updatedAt: timestamp(_faker.date.recent()),
sentAt: timestamp(_faker.date.recent()),
editedAt: timestamp(_faker.date.recent()),
kind: randomValue(_api.berty.chatmodel.Message.Kind),
body: null,
hidden: _faker.random.boolean(),
state: randomValue(_api.berty.chatmodel.Message.State),
conversationId: _faker.random.number() % faker.berty.chatmodel.Conversation.length,
conversation: faker.berty.chatmodel.Conversation[_.conversationId],
memberId: _faker.random.number() % faker.berty.chatmodel.Member.length,
member: faker.berty.chatmodel.Member[_.memberId],
attachments: [],
reactions: [],
}))
export const Attachment: Array<_api.berty.chatmodel.IAttachment> = randomArray(20)
oauthUsers.forEach((oauthUser) => {
hackers.push({
id: uuidv4(),
oauthUserId: oauthUser.id,
firstName: faker.name.firstName(),
lastName: faker.name.lastName(),
email: faker.internet.email(),
phoneNumber: faker.phone.phoneNumber(),
dateOfBirth: faker.date.past(20),
schoolName: faker.company.companyName(),
password: faker.internet.password(8),
createdAt: new Date(),
updatedAt: new Date()
});
});