Company
Date Published
Author
Liza Shulyayeva
Word count
3191
Language
English
Hacker News points
None

Summary

This post is part seven of a series on how to build an app with spatialization features using Daily's real time video and audio APIs. The author welcomes the reader to the final post in their spatialization series, which covers testing approaches used for a demo application built with TypeScript, PixiJS, and the Web Audio API. The demo tests various aspects of its functionality, including user interaction, proximity calculation, and audio graph behavior. To test these features, the authors use two methods: robots, which simulate human-like interactions in virtual rooms, and automated unit and integration tests written in Jest. Robots are simulated using WebDriver instances hosted on AWS, while unit tests focus on validating individual application components, such as functions or classes. Integration tests, on the other hand, test interaction between multiple components. The authors also discuss challenges in testing the Web Audio API and its peripherals, such as MediaStreamTrack, and implement custom mocks to overcome these limitations. Finally, they provide an example of a test case that verifies the pan value of a speaker's audio when positioned at maximum earshot distance from a listener.