Make most tests work.

This commit is contained in:
cpojer 2017-04-11 19:19:25 +01:00
parent cb6f300ed1
commit 16d4cb329b
3 changed files with 34 additions and 1 deletions

View File

@ -26,6 +26,7 @@
"lerna": "v2.0.0-beta.38",
"micromatch": "^2.3.11",
"mkdirp": "^0.5.1",
"promise": "^7.1.1",
"sinon": "^1.17.7"
},
"scripts": {
@ -42,7 +43,18 @@
"watch": "yarn run build; node ./scripts/watch.js"
},
"jest": {
"automock": true,
"testEnvironment": "node",
"timers": "fake"
"timers": "fake",
"setupFiles": [
"<rootDir>/scripts/setupJest.js"
],
"unmockedModulePathPatterns": [
"promise",
"source-map",
"denodeify",
"fbjs",
"sinon"
]
}
}

11
scripts/setupJest.js Normal file
View File

@ -0,0 +1,11 @@
/**
* Copyright (c) 2015-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.
*/
'use strict';
global.Promise = require('promise');

View File

@ -133,6 +133,10 @@ arrify@^1.0.0, arrify@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d"
asap@~2.0.3:
version "2.0.5"
resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.5.tgz#522765b50c3510490e52d7dcfe085ef9ba96958f"
asn1@~0.2.3:
version "0.2.3"
resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86"
@ -2608,6 +2612,12 @@ progress@^1.1.8:
version "1.1.8"
resolved "https://registry.yarnpkg.com/progress/-/progress-1.1.8.tgz#e260c78f6161cdd9b0e56cc3e0a85de17c7a57be"
promise@^7.1.1:
version "7.1.1"
resolved "https://registry.yarnpkg.com/promise/-/promise-7.1.1.tgz#489654c692616b8aa55b0724fa809bb7db49c5bf"
dependencies:
asap "~2.0.3"
prr@~0.0.0:
version "0.0.0"
resolved "https://registry.yarnpkg.com/prr/-/prr-0.0.0.tgz#1a84b85908325501411853d0081ee3fa86e2926a"