I am upgrading an Ember addon we have written to 3.28.1 and after a fair bit of debugging I think I have found what is slowing down the unit tests.
When running the tests I find that they run fine once in the terminal, but when I make a code change it takes over a minute for it to reload (the tests running in the browser are also slowed down by this delay as well).
After commenting out lots of code I have found that it is an observer that seems to be causing this slow down. I appreciate observers are not deprecated now, but don’t fancy trying to refactor this bit of code as part of this work and I don’t really want to remove the unit tests that cover functionality that hits the observer. I have checked and it seems the observer is only hit twice in the tests so it’s not like it is triggering lots and causing issues.
However, when I run the unit tests in the production environment the tests run fine (except that it takes 10 to 15 seconds to rebuild after a code change then the tests run again).
I assume there is some deprecation checking that is going on with observers in non-production environment that is causing this issue?