Skip to content

Instantly share code, notes, and snippets.

@ducas
Created November 19, 2013 01:30
Show Gist options
  • Save ducas/7538667 to your computer and use it in GitHub Desktop.
Save ducas/7538667 to your computer and use it in GitHub Desktop.
Moquire - a lightweight mock version of require.js allowing you to write unit tests properly...
(function (window) {
var moquire = { definedModules: [] };
window.define = function (module, dependencies, factory) {
moquire.definedModules[module] = { name: module, dependencies: dependencies, factory: factory };
};
window.require = function (modules, callback) {
//TODO: something i guess...
};
window.moquire = moquire;
})(window);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment