From 646ebe592e0febe2124facc0ff1071d855be4171 Mon Sep 17 00:00:00 2001 From: Nikolay Lopin Date: Sun, 25 Mar 2018 21:02:35 +0300 Subject: [PATCH] Add setup files and localstorage mock --- package.json | 6 +++++- tests/jest.js | 12 ++++++++++++ yarn.lock | 4 ++++ 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 tests/jest.js diff --git a/package.json b/package.json index 7c6c2a98..18f93450 100644 --- a/package.json +++ b/package.json @@ -163,6 +163,10 @@ "moduleNameMapper": { "\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "/__mocks__/fileMock.js", "\\.(css|less|styl)$": "identity-obj-proxy" - } + }, + "setupFiles": [ + "/tests/jest.js", + "jest-localstorage-mock" + ] } } diff --git a/tests/jest.js b/tests/jest.js new file mode 100644 index 00000000..6f830c67 --- /dev/null +++ b/tests/jest.js @@ -0,0 +1,12 @@ +// Here you can mock the libraries connected through direct insertion