Browse Source

Tiny fix to solve a problem of faker giving a user that's too short.

master
Zed A. Shaw 6 months ago
parent
commit
3bafd5e83e
  1. 20
      lib/testing.js

20
lib/testing.js

@ -97,13 +97,19 @@ const begin = async (start, width=1024, height=2048) => {
return [browser, page];
}
const fake_person = () => ({
name: `${faker.name.firstName()} ${faker.name.lastName()}`,
email: faker.internet.email(),
password: faker.internet.password(),
message: faker.random.words(),
username: faker.internet.userName(),
});
const fake_person = () => {
let username = faker.internet.userName();
if(username.length < 6) username += username;
return {
name: `${faker.name.firstName()} ${faker.name.lastName()}`,
email: faker.internet.email(),
password: faker.internet.password(),
message: faker.random.words(),
username
}
}
const close = () => {
if(browser !== null) browser.close();

Loading…
Cancel
Save