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

fix fakeXHR when response is function handler and url contains RegExp characters #263

Merged

Conversation

salomvary
Copy link
Contributor

The problem here was that String.exec accepts RegExp or string, in the latter case compiles the string into RegExp using new RegExp(string). This might not match in case we ended up here because fake_server.js#L54 matched by string equality.

@imtapps
Copy link

imtapps commented Jun 19, 2013

+1 This seems to fix issue #201

@toranb
Copy link

toranb commented Jul 15, 2013

How is this not merged into master yet? Are there issues w/ this approach or is something missing in the attached pull request?

@williamsbdev
Copy link

There is a passing test and this fix is exactly what is needed. +1 to fix #201

cjohansen added a commit that referenced this pull request Jul 16, 2013
…gexp

fix fakeXHR when response is function handler and url contains RegExp characters
@cjohansen cjohansen merged commit 6acc489 into sinonjs:master Jul 16, 2013
@cjohansen
Copy link
Contributor

Thanks! Sorry about the late response, I simply had failed to notice this...

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

Successfully merging this pull request may close these issues.

None yet

5 participants