You'd probably need to add a class at the start of the test to the body. Then in your CSS if that is set (like "is-testing") then turn off animations etc.
Also in all cases you may not want to disable animations (why this methodology is good) because some JS code may be dependent upon them to get ran. So if you're trying to test your code upon those APIs, they need to run.