Open ohltyler opened 1 year ago
I like the first option and I do believe there is an issue open for in general to migrate away from snapshots within this repo since it makes the test too brittle based on the output. Like caniuse
will output it is out of date some times and it will fail a snapshot test because the actual included the warning message with the other values. Snapshots help us writes test fast but cause issues like this.
https://github.com/opensearch-project/OpenSearch-Dashboards/issues/2329
There are current tests that are skipped due to the snapshots failing when running in envs in different time zones. See https://github.com/opensearch-project/OpenSearch-Dashboards/blob/main/src/plugins/vis_type_vega/public/expressions/helpers.test.js#L194
These should be updated to not include a snapshot, or potentially enforce time zones when running these somehow.