Skip to content

Commit

Permalink
Fix doc generation for Geolocation
Browse files Browse the repository at this point in the history
  • Loading branch information
sahrens committed Apr 24, 2015
1 parent 5225ace commit 8465859
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
23 changes: 23 additions & 0 deletions Libraries/Utilities/__mocks__/ErrorUtils.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// This mock only provides short-circuited methods of applyWithGuard and guard.
// A lot of modules rely on these two functions. This mock relieves their tests
// from depending on the real ErrorUtils module. If you need real error handling
// don't use this mock.
'use strict';

function execute(fun, context, args) {
return fun.apply(context, args);
};

function reportError(error) {
throw error;
}

var ErrorUtils = {
apply: jest.genMockFunction().mockImplementation(execute),
applyWithGuard: jest.genMockFunction().mockImplementation(execute),
inGuard: jest.genMockFunction().mockReturnValue(true),
reportError: jest.genMockFunction().mockImplementation(reportError),
setGlobalHandler: jest.genMockFunction(),
};

module.exports = ErrorUtils;
2 changes: 1 addition & 1 deletion website/server/extractDocs.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ var styles = [
];

var polyfills = [
'../Libraries/GeoLocation/Geolocation.ios.js',
'../Libraries/GeoLocation/Geolocation.js',
];

var all = components
Expand Down

0 comments on commit 8465859

Please sign in to comment.