jquery-mockjax
jquery-mockjax copied to clipboard
The jQuery Mockjax Plugin provides a simple and extremely flexible interface for mocking or simulating ajax requests and responses
$.mockjax(function(settings) { // settings.url might be: "/restful/" such as "/restful/user" var service = settings.url.match(/\/restful\/(.*)$/); if ( service ) { return { proxy: "/mocks/" + service[1] + ".json" }; } //...
I would like a PR template so that people know what is needed for a PR to be accepted for this repo.
I would like an issue template so that people know how to submit issues in a way that will be most effective.
This will necessitate a rewrite of the Node.js tests for Mockjax, but should be done.
This came out of PR #79, but that PR is closed for inactivity. We would want to be able to handle 301, 302, 304, 305, and 307 - although this...
I have code like this **method.js** ``` export function deleteImageFromServer(id){ return $.post('http://localhost:8000/' + 'delete' , { id: id}, function(r){ return r }) } ``` **home.spect.js** ``` import {deleteImageFromServer} from './method'...
I would like to call the server, but modify the response to include additional data, before it is consumed by the caller. It helps the development, when the server API...
Hi I'm having an issue with requests completed after cleaning mocks ``` $.mockjax({ url: '/hello', responseTime: 10000, responseText: "whatever" }); $.get('/hello', function () { console.log('I don't expect to get here');...
I'm wondering if we should assign a proper ID to each mock handler. Currently this is just the index in the array of handlers, but that seems fragile. Having proper...