initial commit taken from gitlab.lrz.de

This commit is contained in:
privatereese
2018-08-24 18:09:42 +02:00
parent ae54ed4c48
commit fc05486403
28494 changed files with 2159823 additions and 0 deletions

156
node_modules/jest-runner/build/index.js generated vendored Normal file
View File

@@ -0,0 +1,156 @@
'use strict';
var _exit;
function _load_exit() {
return _exit = _interopRequireDefault(require('exit'));
}
var _run_test;
function _load_run_test() {
return _run_test = _interopRequireDefault(require('./run_test'));
}
var _throat;
function _load_throat() {
return _throat = _interopRequireDefault(require('throat'));
}
var _jestWorker;
function _load_jestWorker() {
return _jestWorker = _interopRequireDefault(require('jest-worker'));
}
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; } /**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*
*/
const TEST_WORKER_PATH = require.resolve('./test_worker');
class TestRunner {
constructor(globalConfig) {
this._globalConfig = globalConfig;
}
runTests(tests, watcher, onStart, onResult, onFailure, options) {
var _this = this;
return _asyncToGenerator(function* () {
return yield options.serial ? _this._createInBandTestRun(tests, watcher, onStart, onResult, onFailure) : _this._createParallelTestRun(tests, watcher, onStart, onResult, onFailure);
})();
}
_createInBandTestRun(tests, watcher, onStart, onResult, onFailure) {
var _this2 = this;
return _asyncToGenerator(function* () {
const mutex = (0, (_throat || _load_throat()).default)(1);
return tests.reduce(function (promise, test) {
return mutex(function () {
return promise.then(_asyncToGenerator(function* () {
if (watcher.isInterrupted()) {
throw new CancelRun();
}
yield onStart(test);
return (0, (_run_test || _load_run_test()).default)(test.path, _this2._globalConfig, test.context.config, test.context.resolver);
})).then(function (result) {
return onResult(test, result);
}).catch(function (err) {
return onFailure(test, err);
});
});
}, Promise.resolve());
})();
}
_createParallelTestRun(tests, watcher, onStart, onResult, onFailure) {
var _this3 = this;
return _asyncToGenerator(function* () {
// $FlowFixMe: class object is augmented with worker when instantiating.
const worker = new (_jestWorker || _load_jestWorker()).default(TEST_WORKER_PATH, {
exposedMethods: ['worker'],
forkOptions: { stdio: 'inherit' },
maxRetries: 3,
numWorkers: _this3._globalConfig.maxWorkers
});
const mutex = (0, (_throat || _load_throat()).default)(_this3._globalConfig.maxWorkers);
// Send test suites to workers continuously instead of all at once to track
// the start time of individual tests.
const runTestInWorker = function (test) {
return mutex(_asyncToGenerator(function* () {
if (watcher.isInterrupted()) {
return Promise.reject();
}
yield onStart(test);
return worker.worker({
config: test.context.config,
globalConfig: _this3._globalConfig,
path: test.path,
rawModuleMap: watcher.isWatchMode() ? test.context.moduleMap.getRawModuleMap() : null
});
}));
};
const onError = (() => {
var _ref3 = _asyncToGenerator(function* (err, test) {
yield onFailure(test, err);
if (err.type === 'ProcessTerminatedError') {
console.error('A worker process has quit unexpectedly! ' + 'Most likely this is an initialization error.');
(0, (_exit || _load_exit()).default)(1);
}
});
return function onError(_x, _x2) {
return _ref3.apply(this, arguments);
};
})();
const onInterrupt = new Promise(function (_, reject) {
watcher.on('change', function (state) {
if (state.interrupted) {
reject(new CancelRun());
}
});
});
const runAllTests = Promise.all(tests.map(function (test) {
return runTestInWorker(test).then(function (testResult) {
return onResult(test, testResult);
}).catch(function (error) {
return onError(error, test);
});
}));
const cleanup = function () {
return worker.end();
};
return Promise.race([runAllTests, onInterrupt]).then(cleanup, cleanup);
})();
}
}
class CancelRun extends Error {
constructor(message) {
super(message);
this.name = 'CancelRun';
}
}
module.exports = TestRunner;

178
node_modules/jest-runner/build/run_test.js generated vendored Normal file
View File

@@ -0,0 +1,178 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
// Keeping the core of "runTest" as a separate function (as "runTestInternal")
// is key to be able to detect memory leaks. Since all variables are local to
// the function, when "runTestInternal" finishes its execution, they can all be
// freed, UNLESS something else is leaking them (and that's why we can detect
// the leak!).
//
// If we had all the code in a single function, we should manually nullify all
// references to verify if there is a leak, which is not maintainable and error
// prone. That's why "runTestInternal" CANNOT be inlined inside "runTest".
let runTestInternal = (() => {
var _ref = _asyncToGenerator(function* (path, globalConfig, config, resolver) {
const testSource = (_fs || _load_fs()).default.readFileSync(path, 'utf8');
const parsedDocblock = (_jestDocblock || _load_jestDocblock()).parse((_jestDocblock || _load_jestDocblock()).extract(testSource));
const customEnvironment = parsedDocblock['jest-environment'];
let testEnvironment = config.testEnvironment;
if (customEnvironment) {
testEnvironment = (0, (_jestConfig || _load_jestConfig()).getTestEnvironment)(Object.assign({}, config, {
testEnvironment: customEnvironment
}));
}
/* $FlowFixMe */
const TestEnvironment = require(testEnvironment);
/* $FlowFixMe */
const testFramework = require(config.testRunner);
/* $FlowFixMe */
const Runtime = require(config.moduleLoader || 'jest-runtime');
let runtime = undefined;
const consoleOut = globalConfig.useStderr ? process.stderr : process.stdout;
const consoleFormatter = function (type, message) {
return (0, (_jestUtil || _load_jestUtil()).getConsoleOutput)(config.cwd, !!globalConfig.verbose,
// 4 = the console call is buried 4 stack frames deep
(_jestUtil || _load_jestUtil()).BufferedConsole.write([], type, message, 4, runtime && runtime.getSourceMaps()));
};
let testConsole;
if (globalConfig.silent) {
testConsole = new (_jestUtil || _load_jestUtil()).NullConsole(consoleOut, process.stderr, consoleFormatter);
} else if (globalConfig.verbose) {
testConsole = new (_jestUtil || _load_jestUtil()).Console(consoleOut, process.stderr, consoleFormatter);
} else {
testConsole = new (_jestUtil || _load_jestUtil()).BufferedConsole(function () {
return runtime && runtime.getSourceMaps();
});
}
const environment = new TestEnvironment(config, { console: testConsole });
const leakDetector = config.detectLeaks ? new (_jestLeakDetector || _load_jestLeakDetector()).default(environment) : null;
const cacheFS = { [path]: testSource };
(0, (_jestUtil || _load_jestUtil()).setGlobal)(environment.global, 'console', testConsole);
runtime = new Runtime(config, environment, resolver, cacheFS, {
collectCoverage: globalConfig.collectCoverage,
collectCoverageFrom: globalConfig.collectCoverageFrom,
collectCoverageOnlyFrom: globalConfig.collectCoverageOnlyFrom
});
const start = Date.now();
yield environment.setup();
try {
const result = yield testFramework(globalConfig, config, environment, runtime, path);
const testCount = result.numPassingTests + result.numFailingTests + result.numPendingTests;
result.perfStats = { end: Date.now(), start };
result.testFilePath = path;
result.coverage = runtime.getAllCoverageInfoCopy();
result.sourceMaps = runtime.getSourceMapInfo(new Set(Object.keys(result.coverage || {})));
result.console = testConsole.getBuffer();
result.skipped = testCount === result.numPendingTests;
result.displayName = config.displayName;
if (globalConfig.logHeapUsage) {
if (global.gc) {
global.gc();
}
result.memoryUsage = process.memoryUsage().heapUsed;
}
// Delay the resolution to allow log messages to be output.
return new Promise(function (resolve) {
setImmediate(function () {
return resolve({ leakDetector, result });
});
});
} finally {
yield environment.teardown();
}
});
return function runTestInternal(_x, _x2, _x3, _x4) {
return _ref.apply(this, arguments);
};
})();
var _fs;
function _load_fs() {
return _fs = _interopRequireDefault(require('fs'));
}
var _jestUtil;
function _load_jestUtil() {
return _jestUtil = require('jest-util');
}
var _jestJasmine;
function _load_jestJasmine() {
return _jestJasmine = _interopRequireDefault(require('jest-jasmine2'));
}
var _jestLeakDetector;
function _load_jestLeakDetector() {
return _jestLeakDetector = _interopRequireDefault(require('jest-leak-detector'));
}
var _jestConfig;
function _load_jestConfig() {
return _jestConfig = require('jest-config');
}
var _jestDocblock;
function _load_jestDocblock() {
return _jestDocblock = _interopRequireWildcard(require('jest-docblock'));
}
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; } /**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*
*/
// The default jest-runner is required because it is the default test runner
// and required implicitly through the `testRunner` ProjectConfig option.
(_jestJasmine || _load_jestJasmine()).default;
exports.default = (() => {
var _ref2 = _asyncToGenerator(function* (path, globalConfig, config, resolver) {
var _ref3 = yield runTestInternal(path, globalConfig, config, resolver);
const leakDetector = _ref3.leakDetector,
result = _ref3.result;
// Resolve leak detector, outside the "runTestInternal" closure.
result.leaks = leakDetector ? leakDetector.isLeaking() : false;
return result;
});
function runTest(_x5, _x6, _x7, _x8) {
return _ref2.apply(this, arguments);
}
return runTest;
})();

111
node_modules/jest-runner/build/test_worker.js generated vendored Normal file
View File

@@ -0,0 +1,111 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.worker = undefined;
let worker = exports.worker = (() => {
var _ref2 = _asyncToGenerator(function* (_ref) {
let config = _ref.config,
globalConfig = _ref.globalConfig,
path = _ref.path,
rawModuleMap = _ref.rawModuleMap;
try {
return yield (0, (_run_test || _load_run_test()).default)(path, globalConfig, config, getResolver(config, rawModuleMap));
} catch (error) {
throw formatError(error);
}
});
return function worker(_x) {
return _ref2.apply(this, arguments);
};
})();
var _exit;
function _load_exit() {
return _exit = _interopRequireDefault(require('exit'));
}
var _jestHasteMap;
function _load_jestHasteMap() {
return _jestHasteMap = _interopRequireDefault(require('jest-haste-map'));
}
var _jestMessageUtil;
function _load_jestMessageUtil() {
return _jestMessageUtil = require('jest-message-util');
}
var _jestRuntime;
function _load_jestRuntime() {
return _jestRuntime = _interopRequireDefault(require('jest-runtime'));
}
var _run_test;
function _load_run_test() {
return _run_test = _interopRequireDefault(require('./run_test'));
}
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; } /**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*
*/
// Make sure uncaught errors are logged before we exit.
process.on('uncaughtException', err => {
console.error(err.stack);
(0, (_exit || _load_exit()).default)(1);
});
const formatError = error => {
if (typeof error === 'string') {
var _separateMessageFromS = (0, (_jestMessageUtil || _load_jestMessageUtil()).separateMessageFromStack)(error);
const message = _separateMessageFromS.message,
stack = _separateMessageFromS.stack;
return {
message,
stack,
type: 'Error'
};
}
return {
code: error.code || undefined,
message: error.message,
stack: error.stack,
type: 'Error'
};
};
const resolvers = Object.create(null);
const getResolver = (config, rawModuleMap) => {
// In watch mode, the raw module map with all haste modules is passed from
// the test runner to the watch command. This is because jest-haste-map's
// watch mode does not persist the haste map on disk after every file change.
// To make this fast and consistent, we pass it from the TestRunner.
if (rawModuleMap) {
return (_jestRuntime || _load_jestRuntime()).default.createResolver(config, new (_jestHasteMap || _load_jestHasteMap()).default.ModuleMap(rawModuleMap));
} else {
const name = config.name;
if (!resolvers[name]) {
resolvers[name] = (_jestRuntime || _load_jestRuntime()).default.createResolver(config, (_jestRuntime || _load_jestRuntime()).default.createHasteMap(config).readModuleMap());
}
return resolvers[name];
}
};

95
node_modules/jest-runner/package.json generated vendored Normal file
View File

@@ -0,0 +1,95 @@
{
"_args": [
[
"jest-runner@^22.4.4",
"/home/bernhard/freifunk-app/node_modules/jest/node_modules/jest-cli"
]
],
"_from": "jest-runner@>=22.4.4 <23.0.0",
"_id": "jest-runner@22.4.4",
"_inCache": true,
"_installable": true,
"_location": "/jest-runner",
"_nodeVersion": "8.9.1",
"_npmOperationalInternal": {
"host": "s3://npm-registry-packages",
"tmp": "tmp/jest-runner_22.4.4_1526648358747_0.10882824805474711"
},
"_npmUser": {
"email": "mjesun@hotmail.com",
"name": "mjesun"
},
"_npmVersion": "5.5.1",
"_phantomChildren": {},
"_requested": {
"name": "jest-runner",
"raw": "jest-runner@^22.4.4",
"rawSpec": "^22.4.4",
"scope": null,
"spec": ">=22.4.4 <23.0.0",
"type": "range"
},
"_requiredBy": [
"/jest/jest-cli"
],
"_resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-22.4.4.tgz",
"_shasum": "dfca7b7553e0fa617e7b1291aeb7ce83e540a907",
"_shrinkwrap": null,
"_spec": "jest-runner@^22.4.4",
"_where": "/home/bernhard/freifunk-app/node_modules/jest/node_modules/jest-cli",
"bugs": {
"url": "https://github.com/facebook/jest/issues"
},
"dependencies": {
"exit": "^0.1.2",
"jest-config": "^22.4.4",
"jest-docblock": "^22.4.0",
"jest-haste-map": "^22.4.2",
"jest-jasmine2": "^22.4.4",
"jest-leak-detector": "^22.4.0",
"jest-message-util": "^22.4.0",
"jest-runtime": "^22.4.4",
"jest-util": "^22.4.1",
"jest-worker": "^22.2.2",
"throat": "^4.0.0"
},
"devDependencies": {},
"directories": {},
"dist": {
"fileCount": 4,
"integrity": "sha512-5S/OpB51igQW9xnkM5Tgd/7ZjiAuIoiJAVtvVTBcEBiXBIFzWM3BAMPBM19FX68gRV0KWyFuGKj0EY3M3aceeQ==",
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa/s4nCRA9TVsSAnZWagAA+yEP/A1KNFhPANE89Drry10I\nnFBo6aegiWZuIrNRG99GbZAFJQuNZVgIxzsjTilHrso912Is9Vm3u4/0uWcV\nztT1ZJKvwNRdqCTcUxIQfKiC/1u+DHsbEmE/8kejvhfaFtUiURBxc+gTQDMV\nPR3H+CB3agn6QTG5obkEBpNgF/SM+GAEU9oZa2b5N/SUq5uGWC4dmtSUhnnF\nFgL8rDlptfwLdKlhMd+w0w98tFYxWUw9d1BDZB2tvuA7eFZSU7IGKLZt+goR\nIbuCkc4iz8bOpQQBnkl/nCWZOGwL/TPrBi5K3TdpyWQowFy1z5/hiSKO07MS\n88NSnN08pyCGAYs2hyVfVeX8KxSinU8TbprXNF+yygSQrF9I8rr2Bucli1YM\nJbeNL4o58xbV9qBfCu9aIOIWrsJP7rd9LOyfC1G3Uw69cYe8MEUt/91q55BK\nFg3dimTjKYNSzY1/p3GNVsmM5abZIQbOtKd+YC7w58Shc0JKwigpcnxQM7XB\nGDX4NSqbUbxT9huqYnchC0S17BPz/7K8ujoKxohfXfK22u2+m9B92dSkTOWd\nXDJt6ev9Rc9DrTfB7w84mTCYq/n7j7rfWd3mdBRSJMh46sRrrSq7B8fIGeFI\n0WR1Z6923laI2kYYNKsNF0ZZZO1ix/hNbhkVAO9e6WeQoSJp/IEkOtublZeA\nW/eN\r\n=pRO9\r\n-----END PGP SIGNATURE-----\r\n",
"shasum": "dfca7b7553e0fa617e7b1291aeb7ce83e540a907",
"tarball": "https://registry.npmjs.org/jest-runner/-/jest-runner-22.4.4.tgz",
"unpackedSize": 25529
},
"homepage": "https://github.com/facebook/jest#readme",
"license": "MIT",
"main": "build/index.js",
"maintainers": [
{
"name": "aaronabramov",
"email": "aaron@abramov.io"
},
{
"name": "cpojer",
"email": "christoph.pojer@gmail.com"
},
{
"name": "fb",
"email": "opensource+npm@fb.com"
},
{
"name": "mjesun",
"email": "mjesun@hotmail.com"
}
],
"name": "jest-runner",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git+https://github.com/facebook/jest.git"
},
"version": "22.4.4"
}