forked from StateVoicesNational/Spoke
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
44 lines (44 loc) · 1.35 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
module.exports = {
verbose: true,
testURL: "http://localhost/",
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",
JOBS_SAME_PROCESS: "1",
RETHINK_KNEX_NOREFS: "1", // avoids db race conditions
DEFAULT_SERVICE: 'fakeservice',
DST_REFERENCE_TIMEZONE: 'America/New_York',
DATABASE_SETUP_TEARDOWN_TIMEOUT: 60000,
PASSPORT_STRATEGY: 'local',
SESSION_SECRET: 'it is JUST a test! -- it better be!',
TEST_ENVIRONMENT: '1'
},
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/**"],
setupTestFrameworkScriptFile: "<rootDir>/__test__/setup.js",
testPathIgnorePatterns: ["<rootDir>/node_modules/", "<rootDir>/__test__/e2e/"]
};