@@ -830,12 +830,12 @@ QUnit.module('readThemeMarker error handling', () => {
830830 test ( 'readThemeMarker returns null when getComputedStyle throws an error' , function ( assert ) {
831831 const done = assert . async ( ) ;
832832 const originalGetComputedStyle = window . getComputedStyle ;
833- window . getComputedStyle = function ( ) { throw new Error ( 'getComputedStyle fails' ) ; } ;
833+ window . getComputedStyle = undefined ;
834834
835835 try {
836836 themes . resetTheme ( ) ;
837837 const value = themes . current ( ) ;
838- assert . strictEqual ( value , null , 'current() returns null on getComputedStyle error ' ) ;
838+ assert . strictEqual ( value , null , 'current() returns null on getComputedStyle being undefined ' ) ;
839839 } finally {
840840 window . getComputedStyle = originalGetComputedStyle ;
841841 done ( ) ;
@@ -845,14 +845,14 @@ QUnit.module('readThemeMarker error handling', () => {
845845 test ( 'waitForThemeLoad resolves even if getComputedStyle continuously throws' , function ( assert ) {
846846 const done = assert . async ( ) ;
847847 const originalGetComputedStyle = window . getComputedStyle ;
848- window . getComputedStyle = function ( ) { throw new Error ( 'boom' ) ; } ;
848+ window . getComputedStyle = undefined ;
849849
850850 const TEST_TIMEOUT = 30 ;
851851 themes . resetTheme ( ) ;
852852 themes . setDefaultTimeout ( TEST_TIMEOUT ) ;
853853
854854 themes . ready ( ( ) => {
855- assert . strictEqual ( themes . current ( ) , null , 'theme remains null after timeout with errors ' ) ;
855+ assert . strictEqual ( themes . current ( ) , null , 'theme remains null after timeout' ) ;
856856 window . getComputedStyle = originalGetComputedStyle ;
857857 themes . setDefaultTimeout ( defaultTimeout ) ;
858858 done ( ) ;
0 commit comments