UNPKG

system-extension-stub

Version:

SystemJS extension for stubbing modules

12 lines (8 loc) 211 B
var stub = require('stub'); var noop = function(){}; stub('moment', function() { return noop; }); System.import('moment').then(function(moment) { console.assert(moment === noop, "Correctly stubbed"); });