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,4 @@
**/__mocks__/**
**/__tests__/**
src
yarn.lock

View File

@@ -0,0 +1,56 @@
'use strict'; /**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/
const vm = require('vm');var _require =
require('jest-util');const FakeTimers = _require.FakeTimers,installCommonGlobals = _require.installCommonGlobals;
const mock = require('jest-mock');
class NodeEnvironment {
constructor(config) {
this.context = vm.createContext();
const global = this.global = vm.runInContext('this', this.context);
global.global = global;
global.clearInterval = clearInterval;
global.clearTimeout = clearTimeout;
global.Promise = Promise;
global.setInterval = setInterval;
global.setTimeout = setTimeout;
installCommonGlobals(global, config.globals);
this.moduleMocker = new mock.ModuleMocker(global);
this.fakeTimers = new FakeTimers(global, this.moduleMocker, config);
}
dispose() {
if (this.fakeTimers) {
this.fakeTimers.dispose();
}
this.context = null;
this.fakeTimers = null;
}
runScript(script) {
if (this.context) {
return script.runInContext(this.context);
}
return null;
}}
module.exports = NodeEnvironment;

View File

@@ -0,0 +1,46 @@
{
"_args": [
[
"jest-environment-node@20.0.3",
"C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\torrent-project"
]
],
"_from": "jest-environment-node@20.0.3",
"_id": "jest-environment-node@20.0.3",
"_inBundle": false,
"_integrity": "sha1-1Ii8RhKvLCRumG6K52caCZFj1AM=",
"_location": "/react-scripts/jest-environment-node",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "jest-environment-node@20.0.3",
"name": "jest-environment-node",
"escapedName": "jest-environment-node",
"rawSpec": "20.0.3",
"saveSpec": null,
"fetchSpec": "20.0.3"
},
"_requiredBy": [
"/react-scripts/jest-config"
],
"_resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-20.0.3.tgz",
"_spec": "20.0.3",
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\torrent-project",
"bugs": {
"url": "https://github.com/facebook/jest/issues"
},
"dependencies": {
"jest-mock": "^20.0.3",
"jest-util": "^20.0.3"
},
"homepage": "https://github.com/facebook/jest#readme",
"license": "BSD-3-Clause",
"main": "build/index.js",
"name": "jest-environment-node",
"repository": {
"type": "git",
"url": "git+https://github.com/facebook/jest.git"
},
"version": "20.0.3"
}