{"id":26347313,"url":"https://github.com/survi218/karma-jasmine-testing","last_synced_at":"2025-03-16T07:16:36.096Z","repository":{"id":139643310,"uuid":"92638409","full_name":"survi218/karma-jasmine-testing","owner":"survi218","description":"unit testing in your Angular applications using Angular mocks, Karma, and Jasmine ","archived":false,"fork":false,"pushed_at":"2017-05-28T06:14:14.000Z","size":36371,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-05T21:57:37.957Z","etag":null,"topics":["angularjs","jasmine-tests","jasmine-tests-angularjs","karma-cli","karma-config","karma-jasmine","karma-preprocessor","karma-test-runner","unit-testing"],"latest_commit_sha":null,"homepage":"","language":"HTML","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/survi218.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":"2017-05-28T03:48:00.000Z","updated_at":"2017-05-28T05:58:53.000Z","dependencies_parsed_at":"2023-07-23T08:03:52.990Z","dependency_job_id":null,"html_url":"https://github.com/survi218/karma-jasmine-testing","commit_stats":null,"previous_names":["survi218/karma-jasmine-testing"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/survi218%2Fkarma-jasmine-testing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/survi218%2Fkarma-jasmine-testing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/survi218%2Fkarma-jasmine-testing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/survi218%2Fkarma-jasmine-testing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/survi218","download_url":"https://codeload.github.com/survi218/karma-jasmine-testing/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243835926,"owners_count":20355616,"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":["angularjs","jasmine-tests","jasmine-tests-angularjs","karma-cli","karma-config","karma-jasmine","karma-preprocessor","karma-test-runner","unit-testing"],"created_at":"2025-03-16T07:16:35.542Z","updated_at":"2025-03-16T07:16:36.089Z","avatar_url":"https://github.com/survi218.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# karma-jasmine-testing\n- unit testing in your Angular applications. You will learn about Angular mocks, Karma, and      Jasmine and learn how to use them to carry out unit testing and e2e testing.\n  - Configure a Karma configuration file and Set up unit tests using Jasmine and carry out the   unit test automatically\n  - Setting up the Unit Test Environment\n- First, set up Jasmine core to be available for use within your project:\n\n# install karma and karma-jasmine\n\n```````\nnpm install karma --save-dev\nnpm install jasmine-core --save-dev\n````````\n- Then, set up the Karma command line tools globally as follows:\n\n``````\n     npm install karma-cli -g\n``````\n\nRemember to use sudo if you are in OSX or Linux environments.\nThen set up karma-jasmine plugin to make use of Jasmine with Karma:\n``````````\n     npm install karma-jasmine --save-dev\n````````````\n- In order to set up browser environments to carry out the tests, set up PhantomJS, and Karma launchers for PhantomJS and Chrome as follows:\n\n````````\n     npm install phantomjs karma-phantomjs-launcher karma-chrome-launcher karma-edge-launcher  --save-dev\n`````````` \n\n- You can also set up for Firefox, IE and Safari if you use these browsers.\nSetting up Angular Mocks\nYou should also install the ngMock module as follows:\n\n``````````\n     bower install angular-mocks -S\n``````````````\nUnit Testing of MenuController\nNext, we will configure Karma to conduct the unit test. First, create a folder in conFusion folder, named test.\nMove to the test folder, and create a file named karma.conf.js there. This file will contain the configuration information for the Karma tests. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsurvi218%2Fkarma-jasmine-testing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsurvi218%2Fkarma-jasmine-testing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsurvi218%2Fkarma-jasmine-testing/lists"}