diff --git a/dev/tests/js/jasmine/tests/lib/mage/decorate.test.js b/dev/tests/js/jasmine/tests/lib/mage/decorate.test.js
index 9b488c417674dabf8896c8837ddb9109e95c67b0..898bcf8b51128e62138190bc3d7dc4418705c19d 100644
--- a/dev/tests/js/jasmine/tests/lib/mage/decorate.test.js
+++ b/dev/tests/js/jasmine/tests/lib/mage/decorate.test.js
@@ -192,10 +192,9 @@ define([
             it('Check error message', function () {
                 var $list = $('#' + listId);
 
-                spyOn(jQuery, 'error');
+                spyOn($, 'error');
                 $list.decorate('customMethod');
-
-                expect(jQuery.error).toHaveBeenCalledWith('Method customMethod does not exist on jQuery.decorate');
+                expect($.error).toHaveBeenCalledWith('Method customMethod does not exist on jQuery.decorate');
             });
         });
     });