forked from Manuel1234477/Stellar-Micro-Donation-API
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.e2e.js
More file actions
38 lines (30 loc) · 1.2 KB
/
jest.config.e2e.js
File metadata and controls
38 lines (30 loc) · 1.2 KB
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
/**
* Jest Configuration — E2E Testnet Suite
*
* Completely separate from jest.config.js (unit/integration tests).
* Run with: npm run test:e2e
*
* Key differences from the unit-test config:
* - Targets only tests/e2e/**\/*.e2e.test.js
* - 60-second timeout per test (real Stellar network ops)
* - Single worker process (serial) to avoid Friendbot rate limits
* - Custom globalSetup/globalTeardown that target real testnet
* - No MOCK_STELLAR — all Stellar calls hit the live testnet
*/
'use strict';
module.exports = {
testEnvironment: 'node',
// Only run e2e tests — never bleed into the unit test suite
testMatch: ['**/tests/e2e/**/*.e2e.test.js'],
// Lifecycle hooks unique to the e2e run
globalSetup: '<rootDir>/tests/e2e/setup.js',
globalTeardown: '<rootDir>/tests/e2e/teardown.js',
// Real Stellar network operations (Friendbot + tx confirmation) can take 30s+
testTimeout: 60000,
// Run test files serially — parallel Friendbot calls hit rate limits quickly
maxWorkers: 1,
// Verbose output so nightly CI logs show exactly which tests ran
verbose: true,
// Coverage collection is opt-in for e2e — pass --coverage flag explicitly
collectCoverage: false,
};