Skip to content

Commit 3a795e7

Browse files
committed
Move new variables to top of scope to fall in line with convention
1 parent 203749c commit 3a795e7

File tree

1 file changed

+2
-2
lines changed
  • dev/tests/js/jasmine/tests/app/code/Magento/Checkout/frontend/js/model/cart/totals-processor

1 file changed

+2
-2
lines changed

dev/tests/js/jasmine/tests/app/code/Magento/Checkout/frontend/js/model/cart/totals-processor/default.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,13 +113,13 @@ define([
113113
});
114114

115115
it('estimateTotals if data wasn\'t cached and request was successfully sent', function () {
116+
var deferral = new $.Deferred();
116117
spyOn(mocks['Magento_Checkout/js/model/cart/cache'], 'isChanged').and.returnValue(true);
117118
spyOn(mocks['Magento_Customer/js/customer-data'], 'get').and.returnValue(
118119
ko.observable({
119120
'data_id': 1
120121
})
121122
);
122-
var deferral = new $.Deferred();
123123
spyOn(mocks['Magento_Checkout/js/model/cart/cache'], 'get');
124124
spyOn(mocks['mage/storage'], 'post').and.callFake(function () {
125125
data.shippingMethodCode = mocks['Magento_Checkout/js/model/quote'].shippingMethod()['method_code'];
@@ -137,14 +137,14 @@ define([
137137
});
138138

139139
it('estimateTotals if data wasn\'t cached and request returns error', function () {
140+
var deferral = new $.Deferred();
140141
spyOn(mocks['Magento_Checkout/js/model/cart/cache'], 'isChanged').and.returnValue(true);
141142
spyOn(mocks['Magento_Customer/js/customer-data'], 'get').and.returnValue(
142143
ko.observable({
143144
'data_id': 1
144145
})
145146
);
146147
spyOn(mocks['Magento_Checkout/js/model/cart/cache'], 'get');
147-
var deferral = new $.Deferred();
148148
spyOn(mocks['mage/storage'], 'post').and.callFake(function () {
149149
return deferral.reject('Error Message');
150150
});

0 commit comments

Comments
 (0)