-
-
Notifications
You must be signed in to change notification settings - Fork 943
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In email functionality : Second name is not appending in email most of the time #1000
Comments
Shinigami92 could you please confirm this issue is persist |
faker/src/modules/internet/index.ts Lines 78 to 80 in 4e38a70
faker/src/modules/internet/index.ts Lines 129 to 151 in 4e38a70
From the code, it looks like this is expected behavior. |
This issue appears to have been alluded to in #1044 with reference to unpredictable data in tests. The behavior is expected, but should it really be desired? It seems to me that if a user provides a last name to userName() and email(), the last name should be included in the username and email. Interested in the reasoning behind the current solution. Apologies if this is already being addressed! |
IMO If the users wants to have email-adresses that are always firstname.lastname@xyz.abc, Maybe, we could add/change the methods to use an |
Fair enough; I certainly wouldn't want to sacrifice any variety. Just not sure why the last name couldn't be included every time if provided.
I like this idea. |
Team decision We should change the email function to take the inputs more into account. If parameters are passed to the method, then we will specific patterns to use them. |
Hi, sorry I'm late to the party This was always something I had back in my mind I wanted to have changed in faker I would like to change the behavior of this method alongside with Then we can re-code it to |
Nice to see this issue bumped, and agree with all the reasoning here. I would tackle this myself but unfortunately I don't think I can dedicate any time to it very soon. |
I came here to log this issue as well, hope it gets fixed soon! |
Describe the bug
Trying to create 100 emails with first name, second name, and provider. but generating email doesn't have a second name most of the time.
Reproduction
Code:
const firstName = "groot";
const secondName = "at";
const random = Math.floor(Math.random() *100000);
secondName = secondName+random;
console.log("First name: ",firstName,"Second name : ",secondName)
const email = faker.internet.email(firstName,secondName,provider).replace(/[^a-zA-Z0-9@.]/g, "");
console.log(email);
Response:
[0-0] First name: groot Second name: at29913
[0-0] groot56@gmail.com
[0-0] First name: groot Second name: at30314
[0-0] groot.at30314@gmail.com
[0-0] First name: groot Second name: at13277
[0-0] groot.at1327778@gmail.com
[0-0] First name: groot Second name: at60615
[0-0] grootat6061518@gmail.com
[0-0] First name: groot Second name: at84925
[0-0] groot5@gmail.com
[0-0] First name: groot Second name: at67487
[0-0] grootat6748741@gmail.com
[0-0] First name: groot Second name: at1124
[0-0] groot.at112430@gmail.com
[0-0] First name: groot Second name: at15594
[0-0] groot94@gmail.com
[0-0] First name: groot Second name: at77943
[0-0] groot.at7794310@gmail.com
[0-0] First name: groot Second name: at66877
[0-0] groot10@gmail.com
[0-0] First name: groot Second name: at73118
[0-0] groot41@gmail.com
[0-0] First name: groot Second name: at43517
[0-0] grootat43517@gmail.com
[0-0] First name: groot Second name: at66282
[0-0] groot62@gmail.com
[0-0] First name: groot Second name: at4783
[0-0] groot.at4783@gmail.com
[0-0] First name: groot Second name: at80369
[0-0] groot.at803690@gmail.com
[0-0] First name: groot Second name: at98724
[0-0] grootat9872427@gmail.com
[0-0] First name: groot Second name: at42108
[0-0] groot62@gmail.com
[0-0] First name: groot Second name: at23822
[0-0] grootat23822@gmail.com
[0-0] First name: groot Second name: at75730
[0-0] grootat757300@gmail.com
[0-0] First name: groot Second name: at17076
[0-0] grootat17076@gmail.com
[0-0] First name: groot Second name: at27913
[0-0] groot25@gmail.com
[0-0] First name: groot Second name: at6139
[0-0] groot.at613994@gmail.com
[0-0] First name: groot Second name: at29583
[0-0] groot92@gmail.com
[0-0] First name: groot Second name: at34788
[0-0] groot7@gmail.com
[0-0] First name: groot Second name: at53021
[0-0] grootat53021@gmail.com
[0-0] First name: groot Second name: at91160
[0-0] groot.at9116062@gmail.com
[0-0] First name: groot Second name: at74768
[0-0] groot85@gmail.com
[0-0] First name: groot Second name: at41251
[0-0] grootat41251@gmail.com
Additional Info
in above response most of the time second name is not appending please check on that issue
The text was updated successfully, but these errors were encountered: