Applying RequireJS to mocks
In the case of mocks, we need to require the Mockjax and the Mockjson library, as follows:
define([ 'jquery', 'mockjson', 'mockjax' ], function ($, mockjson, mockjax) { $.mockJSON.data.PRODUCTNAME = [ 'T-SHIRT', 'SHIRT', 'TROUSERS', 'JEANS', 'SHORTS', 'GLOVES', 'TIE' ]; ... });