forked from StateVoicesNational/Spoke
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
54 lines (54 loc) · 1.54 KB
/
jest.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
module.exports = {
verbose: true,
testURL: "http://localhost:3000",
testEnvironment: "node",
globals: {
SUPPRESS_DATABASE_AUTOCREATE: "1",
DB_JSON: JSON.stringify({
client: "pg",
connection: {
host: "127.0.0.1",
port: "5432",
database: "spoke_test",
password: "spoke_test",
user: "spoke_test"
}
}),
JOBS_SYNC: "1",
TASKS_SYNC: "1",
JOBS_SAME_PROCESS: "1",
RETHINK_KNEX_NOREFS: "1", // avoids db race conditions
DEFAULT_SERVICE: "fakeservice",
DST_REFERENCE_TIMEZONE: "US/Eastern",
DATABASE_SETUP_TEARDOWN_TIMEOUT: 60000,
PASSPORT_STRATEGY: "local",
SESSION_SECRET: "it is JUST a test! -- it better be!",
TWILIO_ACCOUNT_SID: "", // purposefully blank
TWILIO_MESSAGE_SERVICE_SID: "TEST_MESSAGE_SID",
TEST_ENVIRONMENT: "1",
TEST_ENVIRONMENT_FAKE: "0",
TEST_ENVIRONMENT_FAKE2: "false"
},
moduleFileExtensions: ["js", "jsx"],
transform: {
".*.js": "<rootDir>/node_modules/babel-jest"
},
moduleDirectories: ["node_modules"],
moduleNameMapper: {
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$":
"<rootDir>/__mocks__/fileMock.js",
"\\.(css|less)$": "<rootDir>/__mocks__/styleMock.js"
},
collectCoverageFrom: [
"**/*.{js,jsx}",
"!**/node_modules/**",
"!**/__test__/**",
"!**/deploy/**",
"!**/coverage/**"
],
setupFilesAfterEnv: ["<rootDir>/__test__/setup.js"],
testPathIgnorePatterns: [
"<rootDir>/node_modules/",
"<rootDir>/__test__/cypress/"
]
};