Open
Conversation
HW7(Tests)/unit.test.js
Outdated
Comment on lines
6
to
19
| let passwordTrue = [ | ||
| 'aaaaaaaaA#', | ||
| 'AAAAAAA22a#', | ||
| 'passwOrd3%' | ||
| ]; | ||
| let passwordFalse = ['парОль3%', | ||
| 'AAAAAAAAAA#', | ||
| 'aA#', | ||
| '2222222222A#', | ||
| '2222222222a#', | ||
| '22222222222', | ||
| '2222222222#', | ||
| '############' | ||
| ]; |
There was a problem hiding this comment.
passwordTrue / passwordFalse - incorrect names.
better option will be smth like correctPasswords / incorrectPasswords
HW7(Tests)/unit.test.js
Outdated
Comment on lines
21
to
23
| expect(passwordTrue).not.toBeNull(); | ||
| expect(passwordTrue).toBeDefined(); | ||
| expect(passwordTrue).not.toBeUndefined(); |
There was a problem hiding this comment.
you are testing the variable you wrote inside the test. what for?
HW7(Tests)/unit.test.js
Outdated
Comment on lines
38
to
58
| let emailTrue = [ | ||
| 'example@gmail.com', | ||
| 'EXAMPLE@MAIL.RU', | ||
| 'EXam_p.l-e@gmaiL.Com', | ||
| 'EXam_p.l35e@gmaiL.Com', | ||
| 'gss@Yandex.mojong', | ||
| 'example@356.ru', | ||
| 'example@Flora-mix.ru' | ||
| ]; | ||
| let emailFalse = [ | ||
| '@gmaiL.Com', | ||
| 'gs@Yandex.mojong', | ||
| 'example @gmail.com', | ||
| 'example@356.333', | ||
| 'exa23@44m.p-le@Flora-mix.ru' | ||
| ]; | ||
| test('Testing in function checkEmail if do not write anything:', () => { | ||
| expect(emailTrue).not.toBeNull(); | ||
| expect(emailTrue).toBeDefined(); | ||
| expect(emailTrue).not.toBeUndefined(); | ||
| }); |
There was a problem hiding this comment.
The same questions as in the first part
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.