Skip to content

Ülesanne 1: API testid; Ülesanne 2: Mocked API testid#45

Closed
artmove57 wants to merge 3 commits into
tanjaq:mainfrom
artmove57:main
Closed

Ülesanne 1: API testid; Ülesanne 2: Mocked API testid#45
artmove57 wants to merge 3 commits into
tanjaq:mainfrom
artmove57:main

Conversation

@artmove57
Copy link
Copy Markdown

Artur Genno
TA-23B

@github-actions
Copy link
Copy Markdown

API & Mocked Tests and Coverage

Purpose: Validate README requirements for regular tests, mocked email tests, coverage, and runtime comparison.
Status: ✅ PASS
Regular tests (app.test.js): ✅ PASS (13391ms)
Mocked tests (app.mock.test.js): ✅ PASS (1314ms)
Coverage gate (both runs at 100%): ✅ PASS
Runtime gate (regular ≥ mocked + 1500ms): ✅ PASS
Regular coverage (app.js): lines=100% | statements=100% | functions=100% | branches=100%
Mocked coverage (app.js only): lines=100% | statements=100% | functions=100% | branches=100%
Run details: https://github.com/tanjaq/User-Register/actions/runs/24966162991
PR checks: https://github.com/tanjaq/User-Register/pull/45/checks

@artmove57
Copy link
Copy Markdown
Author

API testid and Mocked API testid

Ülesanne 1

File % Stmts % Branch % Funcs % Lines Uncovered Line #s
All files 100 100 100 100
User-Register 100 100 100 100
app.js 100 100 100 100
User-Register/validation 100 100 100 100
validateEmail.js 100 100 100 100
validatePassword.js 100 100 100 100
validateUsername.js 100 100 100 100

Test Suites: 1 passed, 1 total
Tests: 6 passed, 6 total
Snapshots: 0 total
Time: ~12 s

Ülesanne 2

File % Stmts % Branch % Funcs % Lines Uncovered Line #s
All files 100 100 100 100
User-Register 100 100 100 100
app.js 100 100 100 100
User-Register/validation 100 100 100 100
validatePassword.js 100 100 100 100
validateUsername.js 100 100 100 100

Test Suites: 1 passed, 1 total
Tests: 6 passed, 6 total
Snapshots: 0 total
Time: 1.704 s

Task 1 runs significantly longer than Task 2 because Task 1 uses real email validation with an artificial delay, while Task 2 mocks email validation.

@tanjaq tanjaq closed this May 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants