{"id":16723202,"url":"https://github.com/martinkr/jquery.ajaxmock","last_synced_at":"2025-04-10T10:08:10.832Z","repository":{"id":2573129,"uuid":"3553350","full_name":"martinkr/jQuery.ajaxMock","owner":"martinkr","description":"A tiny yet powerful mocking plugin for jQuery 1.5+","archived":false,"fork":false,"pushed_at":"2018-07-13T04:51:15.000Z","size":612,"stargazers_count":19,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-07T19:46:40.818Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/martinkr.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.markdown","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-02-26T17:05:22.000Z","updated_at":"2023-12-15T16:30:38.000Z","dependencies_parsed_at":"2022-08-28T23:12:41.497Z","dependency_job_id":null,"html_url":"https://github.com/martinkr/jQuery.ajaxMock","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinkr%2FjQuery.ajaxMock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinkr%2FjQuery.ajaxMock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinkr%2FjQuery.ajaxMock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinkr%2FjQuery.ajaxMock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/martinkr","download_url":"https://codeload.github.com/martinkr/jQuery.ajaxMock/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248198883,"owners_count":21063628,"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":[],"created_at":"2024-10-12T22:37:21.349Z","updated_at":"2025-04-10T10:08:10.807Z","avatar_url":"https://github.com/martinkr.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca name=\"README\"\u003e[jQuery.ajaxMock](https://github.com/martinkr/jQuery.ajaxMock)\u003c/a\u003e\n=======\njQuery.ajaxMock is a tiny yet powerful mocking plugin for jQuery 1.5+\nJust register a fake response  (the mock object) . All subsequent $.ajax calls to registered urls will be incercepted, and their're callbacks will recieve the faked response.\nKeep in mind that no real XHRrequests will be made.\n\nWorks like a charm with Jasmine (http://pivotal.github.com/jasmine/) the a behavior-driven development framework for testing JavaScript code.\n\n## Example\n\u003cpre\u003e\n    Register your mock object:\n    /*\n     jQuery.ajaxMock.register( URL , {\n     \treponseText: \"{String} Mocked responseText\",\n     \tstatusCode: \"{Number} Mocked status code\",\n     \tstatus: \"{String} Mocked status description\",\n     \ttype: \"{String} http request method\"\n     })\n     */\n    jQuery.ajaxMock.register('http://example.com', {\n          responseText:'responseFoo',\n          statusCode:200,\n          status:'OK',\n          type: 'POST', // optional, takes a String as http request method default: 'GET'\n          delay: 1000 // optional\n        })\n   );\n\u003c/pre\u003e\nAnd all $.ajax-calls to 'http://example.com' will return the mocked response.\n\n## Requires\n* jQuery JavaScript Library 1.5+ - http://jquery.com/; Copyright 2010, John Resig; Dual licensed under the MIT or GPL Version 2 licenses - http://jquery.org/license\n\n## License\nDual licensed under the MIT and GPL licenses.\n\n* MIT - http://www.opensource.org/licenses/mit-license.php\n* GNU - http://www.gnu.org/licenses/gpl-3.0.html\n\nCopyright (c) 2012 Martin Krause (jquery.public.mkrause.info)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartinkr%2Fjquery.ajaxmock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmartinkr%2Fjquery.ajaxmock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartinkr%2Fjquery.ajaxmock/lists"}