can we emulate print mode (media query print) for unit testing? (Ract, enzyme, jest) i try:
window.matchMedia('print')
but it does not work for me, style media print not applied;
can we emulate print mode (media query print) for unit testing? (Ract, enzyme, jest) i try:
window.matchMedia('print')
but it does not work for me, style media print not applied;
I use iframe for printing and added some param to url for that. We can test printing using thit param:
window.location.hash = '?printMode=true'; // my variant
after that run component and lets try to write tests.