API Test and Mocked API Test Coverage info#48
Closed
sotnemfresh wants to merge 3 commits into
Closed
Conversation
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
API & Mocked Tests and CoveragePurpose: Validate README requirements for regular tests, mocked email tests, coverage, and runtime comparison. |
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.
Test Run Time: 18:02 01.05.2026
PASS validation/validateUsername.test.js
√ return false for empty username (11 ms)
√ return false for username < 6 characters
√ return false for username > 30 characters
√ return true for username > 6 and < 30 characters (1 ms)
√ return false for username that contains unauthorized characters
√ return true for username with authorized characters
PASS validation/validatePassword.test.js
√ return false for empty password (9 ms)
√ return false for password < 8 characters
√ return false for password = 7 characters (1 ms)
√ return true for password = 8 characters
√ return true for password => 8 characters (1 ms)
√ return false for password => 8 characters, no numbers
√ return false for password => 8 characters, no lowercase
√ return false for password => 8 characters, no uppercase
√ return false for password => 8 characters, no letters (1 ms)
√ return false for password with special characters
√ return false for password with special characters and underscore
PASS ./app.mock.test.js
given correct username and password
√ return status 200 (34 ms)
√ returns userId (4 ms)
√ returns correct message (2 ms)
√ content-type is json (3 ms)
√ userId has correct value (4 ms)
given incorrect or missing username and password
√ return status 400 (2 ms)
√ returns error message (3 ms)
√ does NOT return userId (2 ms)
√ missing username returns 400 (3 ms)
√ missing password returns 400 (3 ms)
√ missing email returns 400 (coverage for validateEmail) (2 ms)
√ email is not a string returns 400 (2 ms)
PASS validation/validateEmail.test.js (10.545 s)
√ return false for empty email (2010 ms)
√ return false for missing @ (2000 ms)
√ return false for missing domain (2000 ms)
√ return true for simple valid email (2000 ms)
√ return true for email with subdomain (2000 ms)
PASS ./app.test.js (24.894 s)
given correct username and password
√ return status 200 (2034 ms)
√ returns userId (2004 ms)
√ returns correct message (2003 ms)
√ content-type is json (2003 ms)
√ userId has correct value (2003 ms)
given incorrect or missing username and password
√ return status 400 (2003 ms)
√ returns error message (2003 ms)
√ does NOT return userId (2003 ms)
√ missing username returns 400 (2003 ms)
√ missing password returns 400 (2003 ms)
√ missing email returns 400 (coverage for validateEmail) (2003 ms)
√ email is not a string returns 400 (2001 ms)
Test Suites: 5 passed, 5 total
Tests: 46 passed, 46 total
Snapshots: 0 total
Time: 29.318 s
Ran all test suites.