You should require after you replace the Mock.
https://github.com/mozilla-b2g/gaia/blob/master/apps/system/js/wifi.js#L40