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

Feature: sinonFakeServer#respondWith(method, urlMatcher, body) overload #171

Closed
wants to merge 2 commits into from

Conversation

johnmiroki
Copy link
Contributor

Feature: sinonFakeServer#respondWith(method, urlMatcher, body) where urlMatcher is a predicate. eg

function equalMatcher(requestUrl) {
return "/hello" === requestUrl;
}

It's sort of an inplace replacement for the Regexp.
Also, it's my own feature request: sinonjs/sinon#2318

@johnmiroki johnmiroki closed this Dec 11, 2020
@johnmiroki
Copy link
Contributor Author

Why eslint doesn't like my lambda, eg () => true?

@fatso83
Copy link
Contributor

fatso83 commented Dec 14, 2020

Because arrow functions is not ES5 (it is an ES2015 feature). We are probably dropping IE support in the very near future, and then we will revisit our stance on this ;)

@fatso83
Copy link
Contributor

fatso83 commented Dec 14, 2020

Moved to #172

@sinonjs sinonjs locked and limited conversation to collaborators Dec 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants