diff --git a/package.json b/package.json index 276d914a1a..0a9295e67c 100644 --- a/package.json +++ b/package.json @@ -76,7 +76,6 @@ "@kadira/react-native-storybook": "^1.12.6", "@types/jest": "^18.1.1", "@types/lodash": "^4.14.52", - "@types/node": "^7.0.4", "@types/react-native": "^0.37.11", "@types/react-relay": "^0.9.10", "apphub": "^0.5.1", diff --git a/src/setupJest.ts b/src/setupJest.ts index 59e42110c6..26566c1d1f 100644 --- a/src/setupJest.ts +++ b/src/setupJest.ts @@ -1,6 +1,9 @@ +// Not going to import all of the Node.js typings just for this. +declare const __filename: string + function mockedModule(path: string, moduleName?: string | boolean | null, filename = __filename) { debugger - if (module) { + if (moduleName) { jest.mock(path, () => ({'default': moduleName})) } else { jest.mock(path) diff --git a/yarn.lock b/yarn.lock index 8be5879f8d..7e55895240 100644 --- a/yarn.lock +++ b/yarn.lock @@ -66,10 +66,6 @@ version "4.14.52" resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.52.tgz#de5c7ab14da1289733233c9b0ec6f9e377db90f5" -"@types/node@^7.0.4": - version "7.0.5" - resolved "https://registry.yarnpkg.com/@types/node/-/node-7.0.5.tgz#96a0f0a618b7b606f1ec547403c00650210bfbb7" - "@types/react-native@^0.37.11": version "0.37.13" resolved "https://registry.yarnpkg.com/@types/react-native/-/react-native-0.37.13.tgz#65548f892ed6e55ef87add1ffeec72275b4152b7" @@ -3756,86 +3752,6 @@ react-modal@^1.2.1: version "0.18.2" resolved "https://github.com/orta/react-native-parallax-scroll-view#4e20440f9cd0b6280303b57124c0348c0e63b7c0" -react-native@0.42.0-rc.3: - version "0.42.0-rc.3" - resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.42.0-rc.3.tgz#97f852086ac6ed2e4ad2d43a96203cc3761f6a4b" - dependencies: - absolute-path "^0.0.0" - art "^0.10.0" - async "^2.0.1" - babel-core "^6.21.0" - babel-generator "^6.21.0" - babel-plugin-external-helpers "^6.18.0" - babel-plugin-syntax-trailing-function-commas "^6.20.0" - babel-plugin-transform-flow-strip-types "^6.21.0" - babel-plugin-transform-object-rest-spread "^6.20.2" - babel-polyfill "^6.20.0" - babel-preset-es2015-node "^6.1.1" - babel-preset-fbjs "^2.1.0" - babel-preset-react-native "^1.9.1" - babel-register "^6.18.0" - babel-runtime "^6.20.0" - babel-traverse "^6.21.0" - babel-types "^6.21.0" - babylon "^6.14.1" - base64-js "^1.1.2" - bser "^1.0.2" - chalk "^1.1.1" - commander "^2.9.0" - connect "^2.8.3" - core-js "^2.2.2" - debug "^2.2.0" - denodeify "^1.2.1" - event-target-shim "^1.0.5" - fbjs "^0.8.5" - fbjs-scripts "^0.7.0" - fs-extra "^0.26.2" - glob "^5.0.15" - graceful-fs "^4.1.3" - image-size "^0.3.5" - immutable "~3.7.6" - imurmurhash "^0.1.4" - inquirer "^0.12.0" - jest-haste-map "18.0.0" - joi "^6.6.1" - json-stable-stringify "^1.0.1" - json5 "^0.4.0" - left-pad "^1.1.3" - lodash "^4.16.6" - mime "^1.3.4" - mime-types "2.1.11" - minimist "^1.2.0" - mkdirp "^0.5.1" - node-fetch "^1.3.3" - npmlog "^2.0.4" - opn "^3.0.2" - optimist "^0.6.1" - plist "^1.2.0" - promise "^7.1.1" - react-clone-referenced-element "^1.0.1" - react-timer-mixin "^0.13.2" - react-transform-hmr "^1.0.4" - rebound "^0.0.13" - regenerator-runtime "^0.9.5" - request "^2.79.0" - rimraf "^2.5.4" - sane "~1.4.1" - semver "^5.0.3" - shell-quote "1.6.1" - source-map "^0.5.6" - stacktrace-parser "^0.1.3" - temp "0.8.3" - throat "^3.0.0" - uglify-js "^2.6.2" - whatwg-fetch "^1.0.0" - wordwrap "^1.0.0" - worker-farm "^1.3.1" - write-file-atomic "^1.2.0" - ws "^1.1.0" - xcode "^0.8.9" - xmldoc "^0.4.0" - yargs "^6.4.0" - "react-native@https://github.com/alloy/react-native.git#source_exts": version "0.42.0-rc.3" resolved "https://github.com/alloy/react-native.git#7e73cd89e9c92c63504f344aa6ba51ced76837fa"