Added logging, changed some directory structure

This commit is contained in:
2018-01-13 21:33:40 -05:00
parent f079a5f067
commit 8e72ffb917
73656 changed files with 35284 additions and 53718 deletions

View File

@@ -0,0 +1,20 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
'use strict';
var ErrorUtils = jest.genMockFromModule('../ErrorUtils');
ErrorUtils.applyWithGuard.mockImplementation(function (callback, context, args) {
return callback.apply(context, args);
});
ErrorUtils.guard.mockImplementation(function (callback) {
return callback;
});
module.exports = ErrorUtils;

View File

@@ -0,0 +1,10 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
'use strict';
module.exports = require.requireActual('../base62');

View File

@@ -0,0 +1,10 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
'use strict';
module.exports = require.requireActual('../crc32');

View File

@@ -0,0 +1,26 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @noflow
*/
'use strict';
var Deferred = require.requireActual('../Deferred');
function fetch(uri, options) {
var deferred = new Deferred();
fetch.mock.calls.push([uri, options]);
fetch.mock.deferreds.push(deferred);
return deferred.getPromise();
}
fetch.mock = {
calls: [],
deferreds: []
};
module.exports = fetch;

View File

@@ -0,0 +1,31 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @noflow
*/
'use strict';
var Deferred = require.requireActual('../Deferred');
function fetchWithRetries() {
var deferred = new Deferred();
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
fetchWithRetries.mock.calls.push(args);
fetchWithRetries.mock.deferreds.push(deferred);
return deferred.getPromise();
}
fetchWithRetries.mock = {
calls: [],
deferreds: []
};
module.exports = fetchWithRetries;

View File

@@ -0,0 +1,12 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
'use strict';
jest.dontMock('../nullthrows');
module.exports = require('../nullthrows');