aboutsummaryrefslogtreecommitdiffstats
path: root/jest.config.js
diff options
context:
space:
mode:
authorLibravatar Aditya Mangalampalli <aditya.mangalampalli@gmail.com>2022-05-12 16:34:53 -0700
committerLibravatar GitHub <noreply@github.com>2022-05-12 23:34:53 +0000
commitcc3303cbd87b1dbfe4e41ff8acf4df9e3dc0805d (patch)
tree73fd8c74939bda1ead888d6b6dccbdf68646fabb /jest.config.js
parentfix: preload script detection in unit tests (diff)
downloadferdium-app-cc3303cbd87b1dbfe4e41ff8acf4df9e3dc0805d.tar.gz
ferdium-app-cc3303cbd87b1dbfe4e41ff8acf4df9e3dc0805d.tar.zst
ferdium-app-cc3303cbd87b1dbfe4e41ff8acf4df9e3dc0805d.zip
Add Unit Testing for `url-helpers.ts`; Moved all tests into single pattern so they are run as a suite (#112)
Co-authored-by: Vijay A <vraravam@users.noreply.github.com>
Diffstat (limited to 'jest.config.js')
-rw-r--r--jest.config.js196
1 files changed, 192 insertions, 4 deletions
diff --git a/jest.config.js b/jest.config.js
index 406c9c6d1..c7fd4a604 100644
--- a/jest.config.js
+++ b/jest.config.js
@@ -1,9 +1,197 @@
1/*
2 * For a detailed explanation regarding each configuration property and type check, visit:
3 * https://jestjs.io/docs/configuration
4 */
1module.exports = { 5module.exports = {
2 roots: ['src'], 6 // All imported modules in your tests should be mocked automatically
7 // automock: false,
8
9 // Stop running tests after `n` failures
10 // bail: 0,
11
12 // The directory where Jest should store its cached dependency information
13 // cacheDirectory: "/private/var/folders/cr/bs8xmfp1525cbl_y2h972wf40000gn/T/jest_dx",
14
15 // Automatically clear mock calls, instances and results before every test
16 clearMocks: true,
17
18 // Indicates whether the coverage information should be collected while executing the test
19 collectCoverage: true,
20
21 // An array of glob patterns indicating a set of files for which coverage information should be collected
22 // collectCoverageFrom: undefined,
23
24 // The directory where Jest should output its coverage files
25 coverageDirectory: 'coverage',
26
27 // An array of regexp pattern strings used to skip coverage collection
28 // coveragePathIgnorePatterns: [
29 // "/node_modules/"
30 // ],
31
32 // Indicates which provider should be used to instrument code for coverage
33 // coverageProvider: "babel",
34
35 // A list of reporter names that Jest uses when writing coverage reports
36 // coverageReporters: [
37 // "json",
38 // "text",
39 // "lcov",
40 // "clover"
41 // ],
42
43 // An object that configures minimum threshold enforcement for coverage results
44 // coverageThreshold: undefined,
45
46 // A path to a custom dependency extractor
47 // dependencyExtractor: undefined,
48
49 // Make calling deprecated APIs throw helpful error messages
50 // errorOnDeprecated: false,
51
52 // Force coverage collection from ignored files using an array of glob patterns
53 // forceCoverageMatch: [],
54
55 // A path to a module which exports an async function that is triggered once before all test suites
56 // globalSetup: undefined,
57
58 // A path to a module which exports an async function that is triggered once after all test suites
59 // globalTeardown: undefined,
60
61 // A set of global variables that need to be available in all test environments
62 // globals: {},
63
64 // The maximum amount of workers used to run your tests. Can be specified as % or a number. E.g. maxWorkers: 10% will use 10% of your CPU amount + 1 as the maximum worker number. maxWorkers: 2 will use a maximum of 2 workers.
65 // maxWorkers: "50%",
66
67 // An array of directory names to be searched recursively up from the requiring module's location
68 // moduleDirectories: [
69 // "node_modules"
70 // ],
71
72 // An array of file extensions your modules use
73 // moduleFileExtensions: [
74 // "js",
75 // "jsx",
76 // "ts",
77 // "tsx",
78 // "json",
79 // "node"
80 // ],
81
82 // A map from regular expressions to module names or to arrays of module names that allow to stub out resources with a single module
83 // moduleNameMapper: {},
84
85 // An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader
86 // modulePathIgnorePatterns: [],
87
88 // Activates notifications for test results
89 // notify: false,
90
91 // An enum that specifies notification mode. Requires { notify: true }
92 // notifyMode: "failure-change",
93
94 // A preset that is used as a base for Jest's configuration
95 // preset: undefined,
96
97 // Run tests from one or more projects
98 // projects: undefined,
99
100 // Use this configuration option to add custom reporters to Jest
101 // reporters: undefined,
102
103 // Automatically reset mock state before every test
104 // resetMocks: false,
105
106 // Reset the module registry before running each individual test
107 // resetModules: false,
108
109 // A path to a custom resolver
110 // resolver: undefined,
111
112 // Automatically restore mock state and implementation before every test
113 // restoreMocks: false,
114
115 // The root directory that Jest should scan for tests and modules within
116 // rootDir: undefined,
117
118 // A list of paths to directories that Jest should use to search for files in
119 roots: [
120 'src'
121 ],
122
123 // Allows you to use a custom runner instead of Jest's default test runner
124 // runner: "jest-runner",
125
126 // The paths to modules that run some code to configure or set up the testing environment before each test
127 // setupFiles: [],
128
129 // A list of paths to modules that run some code to configure or set up the testing framework before each test
130 // setupFilesAfterEnv: [],
131
132 // The number of seconds after which a test is considered as slow and reported as such in the results.
133 // slowTestThreshold: 5,
134
135 // A list of paths to snapshot serializer modules Jest should use for snapshot testing
136 // snapshotSerializers: [],
137
138 // The test environment that will be used for testing
139 // testEnvironment: "jest-environment-node",
140 testEnvironment: 'node',
141
142 // Options that will be passed to the testEnvironment
143 // testEnvironmentOptions: {},
144
145 // Adds a location field to test results
146 // testLocationInResults: false,
147
148 // The glob patterns Jest uses to detect test files
149 // testMatch: [
150 // "**/__tests__/**/*.[jt]s?(x)",
151 // "**/?(*.)+(spec|test).[tj]s?(x)"
152 // ],
153
154 // An array of regexp pattern strings that are matched against all test paths, matched tests are skipped
3 testPathIgnorePatterns: [ 155 testPathIgnorePatterns: [
4 'node_modules/', 156 '/node_modules/',
5 'recipes/', 157 '/recipes/',
6 // TODO: Need to unignore tests 158 // TODO: Need to unignore tests
7 'src/internal-server', 159 '/src/internal-server',
8 ], 160 ],
161
162 // The regexp pattern or array of patterns that Jest uses to detect test files
163 // testRegex: [],
164
165 // This option allows the use of a custom results processor
166 // testResultsProcessor: undefined,
167
168 // This option allows use of a custom test runner
169 // testRunner: "jest-circus/runner",
170
171 // This option sets the URL for the jsdom environment. It is reflected in properties such as location.href
172 // testURL: "http://localhost",
173
174 // Setting this value to "fake" allows the use of fake timers for functions such as "setTimeout"
175 // timers: "real",
176
177 // A map from regular expressions to paths to transformers
178 // transform: undefined,
179
180 // An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
181 // transformIgnorePatterns: [
182 // "/node_modules/",
183 // "\\.pnp\\.[^\\/]+$"
184 // ],
185
186 // An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them
187 // unmockedModulePathPatterns: undefined,
188
189 // Indicates whether each individual test should be reported during the run
190 // verbose: undefined,
191
192 // An array of regexp patterns that are matched against all source file paths before re-running tests in watch mode
193 // watchPathIgnorePatterns: [],
194
195 // Whether to use watchman for file crawling
196 // watchman: true,
9}; 197};