Skip to content
This repository has been archived by the owner on Apr 19, 2022. It is now read-only.

Make expiryStrategy consistent across local & CI environments #11

Open
sankaritan opened this issue Dec 10, 2019 · 0 comments
Open

Make expiryStrategy consistent across local & CI environments #11

sankaritan opened this issue Dec 10, 2019 · 0 comments

Comments

@sankaritan
Copy link
Contributor

Starting to questioning this as a default setup: https://github.com/spotify/polly-jest-presets/blob/master/src/index.ts#L27

Multiple projects using the preset required certain configuration changes depending on the POLLY_MODE. An example would be reducing timeouts during the reply mode of spinning up additional proxies for the record mode.

When POLLY_MODE is set to replay & expiryStrategy to record, this can cause test being re-recorded while running on the incorrect configuration. Had to override the expiryStrategy in the local config to always be set to record to mitigate this now.

It would be worth looking at other projects using the preset & potentially removing the ternary from the default config to always default to error. We have learned in our initial testing, after all, that any discrepancy between the local setup and the setup that runs on CI can be very confusing to the developer.

@palmerj3 @fastfrwrd @agraves

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant