constants.ts 772 B

123456789101112131415161718192021222324252627
  1. /**
  2. * Constants for tests
  3. */
  4. /**
  5. * Wait time for processing a single animation frame (in ms)
  6. * Used for waiting for fast renders and DOM updates
  7. */
  8. export const SINGLE_FRAME_TIMEOUT = 16;
  9. /**
  10. * Wait time for processing two animation frames (in ms)
  11. * Used for waiting for fast renders which could be done in two steps for some reason
  12. */
  13. export const TWO_FRAMES_TIMEOUT = SINGLE_FRAME_TIMEOUT * 2;
  14. /**
  15. * Wait time for canvas rendering to stabilize (in ms)
  16. * Used for audio/video components that need canvas rendering to complete
  17. */
  18. export const CANVAS_STABILIZATION_TIMEOUT = 100;
  19. /**
  20. * Wait time for state transitions in audio components (in ms)
  21. * Used after user interactions that change visual state
  22. */
  23. export const AUDIO_STATE_TRANSITION_TIMEOUT = 50;