/jest_api_mock_404

Fake API call to test the function handling with Jest

Primary LanguageHTML

command: jest --coverage

PASS tests/UserManager.test.js ✓ Happy: Test API successfully (8ms) ✓ Unhappy: Test API with 404 return cause invalid data type (3ms)

----------------|---------|----------|---------|---------|-------------------

File % Stmts % Branch % Funcs % Lines Uncovered Line #s
All files 100 100 100 100
UserManager.js 100 100 100 100
---------------- --------- ---------- --------- --------- -------------------
Test Suites: 1 passed, 1 total
Tests: 2 passed, 2 total
Snapshots: 0 total
Time: 1.677s
Ran all test suites.