Skip to content

tienvx/test-mock-server-url-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Test MockServerURL Generator

This is a demo project for this bug

Usage

Commands to run:

yarn install
yarn test
yarn start-stub-server
yarn run request # Expect no 'connection refused' error
# yarn stop-stub-server

Explain

See Slack discussion

The idea is: url2 allow argument value for the basePath parameter to be empty. In that case, it use MockServerURL generator.

That generator work fine with contract tests, because mock server support it.

But it does not work with integration tests, because stub server doesn't support it.

That's why when we run yarn run request (simulate integration test), it throw ECONNREFUSED error, because the base url was wrong (not stub server's base url).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published