Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Are there any tests for this? #11

Open
wyuenho opened this issue Feb 10, 2014 · 9 comments
Open

Are there any tests for this? #11

wyuenho opened this issue Feb 10, 2014 · 9 comments

Comments

@wyuenho
Copy link

wyuenho commented Feb 10, 2014

No description provided.

@ForbesLindesay
Copy link
Owner

No, this is un-tested. I've also just started working on then-request which is a successor to ForbesLindesay/ajax and has a much cleaner, simpler API, rather than being a drop in replacement for jQuery.

It's very early days for the development of then-request, but it does mean that I'm unlikely to do much in the way of maintaining ForbesLindesay/ajax.

@wyuenho
Copy link
Author

wyuenho commented Feb 10, 2014

Is it possible that you keep this jQuerish API and just delegate everything to then-request? I've been looking for a minimalist drop in replacement for $.ajax without much luck.

@ForbesLindesay
Copy link
Owner

What we have here does fill that role. If you would like to submit unit tests for this module I will merge them. If you want to maintain it, I'll happily add you as a contributor?

It may be possible to make this delegate to then-request and just be an adapter to create a jQuery-like API. I would suggest waiting until then-request is a bit more stable first though.

@wyuenho
Copy link
Author

wyuenho commented Feb 10, 2014

I hear you. Let me read some code first. I want to see how much this package covers $.ajax. Hopefully if my eyes haven't been gouged out yet after reading jQuery's code I can throw in some tests.

@ForbesLindesay
Copy link
Owner

This doesn't return jQuery's broken promise thingy, but other than that I think it should be fairly complete.

@lukelex
Copy link

lukelex commented Jun 13, 2014

Hi @ForbesLindesay, do you still want help pushing this forward?

@HenrikJoreteg
Copy link

👍 for this being a thing.

@ForbesLindesay
Copy link
Owner

then-request is now essentially complete. What I would now be keen for is to re-implement basically this functionality on top of that module, we can then build via browserify for client use and publish on npm for server side use (via the same API people are used to from jQuery). Unfortunately I just don't have the time to work on it at the moment, but I will review and accept pull requests that implement any of the following:

  • Add a dependency on then-request
  • Keep the jQuery style api but use then-request in place of all interactions with xhr
  • Add tests for everything but jsonp that run in node.js (this should be relatively simple, since then-request works in node).
  • Add travis-ci and all the badges to the readme (see then-request for an example)
  • Remove info about component from the readme (and delete component.json)
  • Fix build script in package.json to use --standalone and possibly produce an un-minified build as well.
  • Find a good way to add browser tests for the standalone build, including jsonp (perhaps using selenium)
  • Factor jsonp out into a separate module that implements it on both server and client, then perhaps make this depend on that.

@ForbesLindesay
Copy link
Owner

Also, if someone does a few of those, I'd be happy to add them as a contributor so they can review & merge other people's pull requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants