Cleaned up setup/polyfills

This commit is contained in:
Brian Vaughn
2019-04-12 08:55:29 -07:00
parent 81183b1492
commit 4ad85b26c0
3 changed files with 22 additions and 5 deletions
+1
View File
@@ -108,6 +108,7 @@
"jest": "^24.7.1",
"lerna": "^2.8.0",
"lint-staged": "^7.0.5",
"local-storage-fallback": "^4.1.1",
"lodash.throttle": "^4.1.1",
"log-update": "^2.0.0",
"lru-cache": "^4.1.3",
+9 -5
View File
@@ -1,7 +1,11 @@
// @flow
global.localStorage = {
getItem: jest.fn(),
setItem: jest.fn(),
clear: jest.fn(),
};
import storage from 'local-storage-fallback';
// In case async/await syntax is used in a test.
import 'regenerator-runtime/runtime';
// DevTools stores preferences between sessions in localStorage
if (!global.hasOwnProperty('localStorage')) {
global.localStorage = storage;
}
+12
View File
@@ -3284,6 +3284,11 @@ convert-source-map@^1.4.0:
version "1.5.1"
resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.1.tgz#b8278097b9bc229365de5c62cf5fcaed8b5599e5"
cookie@^0.3.1:
version "0.3.1"
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb"
integrity sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=
copy-concurrently@^1.0.0:
version "1.0.5"
resolved "https://registry.yarnpkg.com/copy-concurrently/-/copy-concurrently-1.0.5.tgz#92297398cae34937fcafd6ec8139c18051f0b5e0"
@@ -7199,6 +7204,13 @@ loader-utils@^1.0.2, loader-utils@^1.1.0:
emojis-list "^2.0.0"
json5 "^1.0.1"
local-storage-fallback@^4.1.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/local-storage-fallback/-/local-storage-fallback-4.1.1.tgz#6dc964635c8e9ab6d522d7d88538f465b62bd161"
integrity sha512-Ka4rem1FOgvIaPMokxXTP8DgW8gjfAQSdJC8TGrplDug7vh3b0PZnY/9euG3O3cIGAvJLp33mMU6MJ13x6S+Pw==
dependencies:
cookie "^0.3.1"
locate-path@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e"