Skip to content

Commit

Permalink
Update jest tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrieldutra committed Apr 28, 2020
1 parent 5f56207 commit ed61df1
Show file tree
Hide file tree
Showing 6 changed files with 1,873 additions and 69 deletions.
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,19 +130,20 @@
"fsevents": "^1.2.9"
},
"jest": {
"rootDir": "./client",
"setupFiles": [
"./client/app/__tests__/enzyme_setup.js",
"./client/app/__tests__/mocks.js"
"./app/__tests__/enzyme_setup.js",
"./app/__tests__/mocks.js"
],
"snapshotSerializers": [
"enzyme-to-json/serializer"
],
"moduleNameMapper": {
"^@/(.*)": "<rootDir>/client/app/$1",
"^@/(.*)": "<rootDir>/app/$1",
"\\.(css|less)$": "identity-obj-proxy"
},
"testPathIgnorePatterns": [
"<rootDir>/client/app/__tests__/"
"<rootDir>/app/__tests__/"
]
},
"//": "browserslist set to 'Async functions' compatibility",
Expand Down
4 changes: 4 additions & 0 deletions viz-lib/__tests__/enzyme_setup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { configure } from "enzyme";
import Adapter from "enzyme-adapter-react-16";

configure({ adapter: new Adapter() });
5 changes: 5 additions & 0 deletions viz-lib/__tests__/mocks.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import MockDate from "mockdate";

const date = new Date("2000-01-01T02:00:00.000");

MockDate.set(date);
Loading

0 comments on commit ed61df1

Please sign in to comment.