{"id":18086101,"url":"https://github.com/zakimohammed/ms-jest","last_synced_at":"2026-04-27T22:31:27.454Z","repository":{"id":259357359,"uuid":"877662855","full_name":"ZakiMohammed/ms-jest","owner":"ZakiMohammed","description":"JEST project for MS training.","archived":false,"fork":false,"pushed_at":"2024-10-24T03:06:00.000Z","size":35,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-06T00:43:17.212Z","etag":null,"topics":["jest","node-jest","unit-testing"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ZakiMohammed.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-24T03:00:15.000Z","updated_at":"2024-10-24T03:06:33.000Z","dependencies_parsed_at":"2024-10-24T23:19:54.754Z","dependency_job_id":null,"html_url":"https://github.com/ZakiMohammed/ms-jest","commit_stats":null,"previous_names":["zakimohammed/ms-jest"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZakiMohammed%2Fms-jest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZakiMohammed%2Fms-jest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZakiMohammed%2Fms-jest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZakiMohammed%2Fms-jest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ZakiMohammed","download_url":"https://codeload.github.com/ZakiMohammed/ms-jest/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247419815,"owners_count":20936012,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["jest","node-jest","unit-testing"],"created_at":"2024-10-31T16:06:36.723Z","updated_at":"2026-04-27T22:31:27.426Z","avatar_url":"https://github.com/ZakiMohammed.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JEST - Delightful JavaScript Test Framework\n\nJEST project for MS training.\n\n#### Topics Covered\n\n- Initial Setup\n- Test Specs and Suites\n- Matchers\n- Spying and Mocking\n- Third-Party Packages\n- Commands and Coverage\n\nCheckout the trend: https://npmtrends.com/chai-vs-jasmine-vs-jest-vs-mocha-vs-sinon\n\nCheckout the JEST: https://jestjs.io/\n\n#### Install JEST\n```\nnpm i jest\nnpm i @types/jest\n```\n\n#### Creating Script in package.json\n```\n\"scripts\": {\n  \"test\": \"jest\",\n}\n```\n\n#### Creating a Function\nsum.js\n```\nconst sum = (num1, num2) =\u003e num1 + num2\n\nmodule.exports = sum\n```\n\n#### Writing Test Case\nsum.test.js\n```\nconst sum = require('./sum')\n\ntest('should add num 1 and num 2', () =\u003e {\n    expect(sum(10, 20)).toBe(30)\n})\n```\n\n#### Execute Test Cases\n```\nnpm test\n\n\u003e jest@1.0.0 test\n\u003e jest\n\n PASS  basics/sum.test.js\n  √ should add num 1 and num 2 (2 ms)\n\nTest Suites: 1 passed, 1 total\nTests:       1 passed, 1 total\nSnapshots:   0 total\nTime:        0.666 s, estimated 1 s\nRan all test suites.\n\n```\n\n#### Extra Scripts\n```\n\"scripts\": {\n\t\"test\": \"jest\",\n\t\"test:watch\": \"jest --watchAll\",\n\t\"test:verbose\": \"jest --verbose\",\n\t\"test:coverage\": \"jest --coverage\",\n\t\"test:all\": \"jest --watchAll --verbose --coverage\",\n}\n```\n\n#### Extra Executes\n```\nnpm test\nnpm run test:watch\nnpm run test:verbose\nnpm run test:coverage\nnpm run test:all\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzakimohammed%2Fms-jest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzakimohammed%2Fms-jest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzakimohammed%2Fms-jest/lists"}