Skip to content

Commit 7de7d97

Browse files
committed
fix tests
1 parent db24067 commit 7de7d97

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/devextreme/testing/tests/DevExpress.ui/themes.tests.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)