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

tests for $.fetch #130

Closed
dperrymorrow opened this issue Dec 15, 2015 · 5 comments
Closed

tests for $.fetch #130

dperrymorrow opened this issue Dec 15, 2015 · 5 comments

Comments

@dperrymorrow
Copy link
Collaborator

We need tests for $.fetch, have had a few of issues reported around this method #111 #127 #128 #91 , and its difficult to begin making changes without tests in place.

a good testing strategy would be to use sinon.server
https://gist.github.com/cjohansen/739589

@StrongRef
Copy link
Contributor

I created a simple template for testing $.fetch.

For now it's just echoing the request data back to the client. However, we have to discuss whether #128 is still a valid bug though. Should we improve the way data is stringified?

I can write more tests for fetch once we figure out all bits and pieces!

@dperrymorrow
Copy link
Collaborator Author

great thanks for helping. much appreciated.

@StrongRef
Copy link
Contributor

@LeaVerou I think the hook-commit broke fetch.
xhr => env.xhr?

Line 98: this[name] = hooks[name] || [];
hooks is undefined.

@LeaVerou
Copy link
Owner

Argh. On it, thanks for spotting!

dperrymorrow added a commit that referenced this issue Dec 17, 2015
@dperrymorrow
Copy link
Collaborator Author

$.fetch tests have been merged in no? closing this.

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

No branches or pull requests

3 participants