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

With delay #34

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

With delay #34

wants to merge 8 commits into from

Conversation

LironEr
Copy link

@LironEr LironEr commented Apr 2, 2019

Add The ability to delay a response to fake latency over the network.

Resolves #1

@LironEr LironEr requested a review from nirsky April 3, 2019 12:31
@LironEr LironEr requested a review from nataly87s April 3, 2019 15:04
@@ -295,4 +295,23 @@ describe('Route Matching - willReturn', () => {
expect(fakeServer.hasMade(route.call.withPath(actualPath).withBodyText(actualBody))).toEqual(true);
expect(fakeServer.hasMade(route.call.withBodyText(actualBody).withPath(actualPath))).toEqual(true);
});

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add some tests for multiple restrictions now that it's supported?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not supported

@@ -55,6 +55,7 @@ const route = fakeServer.http
.get() // Http Method (mandatory). See Supported HTTP Methods section.
.to(pathRegex) // Route Path (mandatory). May be regex
.withBody(object) // Route Restriction (optional). See Route Restrictions section.
.withDelay(ms) // Delay response in ms (optional)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not related to this line, but please update the Route Restrictions section that several restrictions are now supported.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not supported

src/FakeHttpCalls.ts Outdated Show resolved Hide resolved
src/FakeHttpCalls.ts Outdated Show resolved Hide resolved
src/utils.ts Outdated Show resolved Hide resolved
Guy Segal added 2 commits June 6, 2020 21:11
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.

2 participants