Skip to content
This repository was archived by the owner on Sep 25, 2019. It is now read-only.

Regex - Restrict Possible Usernames requires more refined tests #263

Open
Nirajn2311 opened this issue Aug 22, 2018 · 3 comments
Open

Regex - Restrict Possible Usernames requires more refined tests #263

Nirajn2311 opened this issue Aug 22, 2018 · 3 comments

Comments

@Nirajn2311
Copy link
Member

Nirajn2311 commented Aug 22, 2018

Describe the bug

In the regex challenge - Restrict possible usernames, when you make the regex expression as follows:

let userCheck = /[A-Za-z][A-Za-z]/; //Let this be Case 1
or
let userCheck = /^[A-Za-z]\w+/; //Let this be Case 2 

The test passes but in Case 1 its supposed to check for numbers in the end and in Case 2 if the input is A2 or e3 it passes.

To Reproduce

Steps to reproduce the behavior:

  1. Go to Restrict possible usernames
  2. Replace line 2 with any of the above two cases.
  3. Click Run the Tests
  4. See error

Expected behavior

A clear and concise description of what you expected to happen.

The tests are not supposed to pass.

Screenshots

If applicable, add screenshots to help explain your problem.
Case 1 regexr link - Case1
Case 2 regexr link - Case2

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Additional context

I think that the description should be updated to tell the user whether the Usernames will include symbols or not and there should be more tests for this challenge.

@ojeytonwilliams
Copy link
Contributor

Hey, I can take a look at this. There definitely need to be a few more tests!

@Nirajn2311
Copy link
Member Author

@ojeytonwilliams sry for not putting it in the description but I had thought of adding more tests in the this week once I had finished some school work.
If you don’t see any PR within a week, you may make one.

@ojeytonwilliams
Copy link
Contributor

ojeytonwilliams commented Aug 23, 2018 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants