const assert = require('assert')
describe('v5.webdriver.io', () => {
it('should make random name', async () => {
await browser.url('https://v5.webdriver.io')
var adjective = ["Excited", "Anxious", "Overweight", "Demonic", "Jumpy", "Misunderstood", "Squashed", "Gargantuan","Broad", "Crooked", "Curved", "Deep", "Even","Excited", "Anxious", "Overweight", "Demonic", "Jumpy", "Misunderstood", "Squashed", "Gargantuan","Broad", "Crooked", "Curved", "Deep", "Even", "Flat", "Hilly", "Jagged", "Round", "Shallow", "Square", "Steep", "Straight", "Thick", "Thin", "Cooing", "Deafening", "Faint", "Harsh", "High-pitched", "Hissing", "Hushed", "Husky", "Loud", "Melodic", "Moaning", "Mute", "Noisy", "Purring", "Quiet", "Raspy", "Screeching", "Shrill", "Silent", "Soft", "Squeaky", "Squealing", "Thundering", "Voiceless", "Whispering"]
var list;
function generator() {
result = adjective[Math.floor(Math.random() * adjective.length)]
return result
}
или
createRandomName() {return "Username" + Math.floor(Math.random() * 100000) }
createRandomEmail() {return "Username" + Math.floor(Math.random() * 10000 ) + "@gmail.com" }
или
createRandomEmail() {return this.createRandomName() + "gmail.com" }
или
function generator() {
result = ["Username" + Math.floor(Math.random() * 100000) ]
return result
}