Changes to server state can be handled by setting a new .mockPaths(). In vignettes, these are handled by creating subdirectories with integer names. This function increments that integer subdirectory and adds it to .mockPaths() so that changed server state can be captured and loaded.

change_state()

Value

Invisibly, the return of .mockPaths() with the new path added.

Details

In a vignette, put a call to change_state() before any code block that makes a change on the server, or rather, before any code block that might repeat the same request previously done and expect a different result.