kirbydesign / designsystem

Kirby Design System
https://cookbook.kirby.design
MIT License
83 stars 22 forks source link

[Housekeeping] Investigate why the Ionic config is being mutated and nested in tests #3181

Closed mark-drastrup closed 8 months ago

mark-drastrup commented 1 year ago

Describe the housekeeping request

When running our tests the Ionic config is being mutated, so the previous version of the config is nested within the new version (see screenshot). This seems happen for every it block that is executed. This explains why animations are not disabled in tests, since the _testing: true setting ends up being deeply nested in the config. This has been fixed in #3180 with a not so elegant approach, where the config is being overriden on the window object in every test suite that has animations.

Screenshot 2023-07-28 at 14 10 26

Have you considered any alternatives?

Are there any additional context?

The setupConfig function from @Ionic/core/dist/esm/index.js is being called once for every test. I haven't been able to pinpoint why it's called every time.

stale[bot] commented 10 months ago

This issue has been automatically marked as stale because of no recent activity. It will be closed in 10 weeks if no further activity occurs. Thank you for your contributions.

stale[bot] commented 8 months ago

This issue has been closed due to inactivity. Please open a new issue if it becomes relevant again.