pollyjs
pollyjs copied to clipboard
Feature: A CLI to regenerate request ids
Recently we updated axios
version. This makes changes to the value of User-Agent
header. As a side effect, when we ran our tests pollyjs
would invalidate existing records and make fresh requests. The APIs are from third parties (Although now its feels like we should have mocked those APIs with hard coded responses.).
We added following configuration to our existing configuration. But above problem still persists.
polly.configure({
matchRequestsBy: {
headers: {
exclude: ['User-Agent']
}
}
});
It would be helpful to have a CLI command that would regenerate fresh request ids without making actual api calls. For this we might even need to have pollyconfig.json
file to put some default configs.