How can I mock TelerikMediaQuery for testing (with bUnit) ?
Regards
1 Answer, 1 is accepted
0
Accepted
Marin Bratanov
Telerik team
answered on 28 May 2021, 08:48 AM
Hi Valeriy,
The media query component uses JavaScript, because there is no other way to handle media queries. Thus, it cannot be mocked through the RenderTree.
What you can consider is mocking the value it will return. Ultimately, what the component does is to give you an event and a boolean value that you will populate in the view-model. You should mock that value.