dsheiko/puppetry

mockRequest: JSON file => absolute file path issue.

Closed this issue · 2 comments

For now - path to the JSON mock file is absolute. With this approach, several people will not be able to work on one project (because they have a different directory structure).
It seems to make sense to make this path relative.

Also, when a project is exported to a .spec file, all mockRequest JSON files becomes inline. That makes editing or reading .spec files much more difficult. Example of generated code:
await bs.mockRequest( "/api/openvpn", "GET", "200 OK", "application/json", "{INLINED JSON FILE HERE}");
Maybe, it would be better to save .json files, for example, in a folder near .spec files?

Addressed in v3.2.0-RC.1
screenshot-1582119851