Skip to content

Instantly share code, notes, and snippets.

@unscriptable
Created October 18, 2011 21:29
Show Gist options
  • Save unscriptable/1296777 to your computer and use it in GitHub Desktop.
Save unscriptable/1296777 to your computer and use it in GitHub Desktop.
example config to map an XHR implementation to a mock impl
global.curl = {
baseUrl: baseUrl,
paths: {
'li/ubox': '../../../../../applications/universal-inbox/src/main/webapp/li/ubox',
'li/schema': '../../../../../applications/universal-inbox/src/main/webapp/li/schema',
'li/referenceData': '../../../../../applications/universal-inbox/src/main/webapp/li/referenceData',
'data': '../../test/webapp/data',
/* this is the interesting line: */
'li/core/xhr': '../../test/webapp/mock/li/core/xhr-promise'
},
pluginPath: 'curl/plugin',
packages: [
{
name: 'dojo',
path: 'dojo',
lib: '.',
main: './lib/main-browser'
},
{
name: 'dijit',
lib: '.',
main: './lib/main'
}
]
};
@unscriptable
Copy link
Author

somewhere else in the code being tested, dependencies for "li/core/xhr" actually are fulfilled with the module at "../../test/webapp/mock/li/core/xhr-promise".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment