LearningSalesForceCommerceC.../storefront-reference-architecture/test/mocks/models/totals.js

35 lines
963 B
JavaScript
Raw Normal View History

2021-12-21 10:57:31 -08:00
'use strict';
var proxyquire = require('proxyquire').noCallThru().noPreserveCache();
var Money = require('../dw.value.Money');
function proxyModel() {
return proxyquire('../../../cartridges/app_storefront_base/cartridge/models/totals', {
'dw/util/StringUtils': {
formatMoney: function () {
return 'formatted money';
}
},
'dw/value/Money': Money,
'dw/util/Template': function () {
return {
render: function () {
return { text: 'someString' };
}
};
},
'dw/util/HashMap': function () {
return {
result: {},
put: function (key, context) {
this.result[key] = context;
}
};
},
'*/cartridge/scripts/util/collections': require('../util/collections')
});
}
module.exports = proxyModel();