-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathtest.config.js
More file actions
46 lines (39 loc) · 1.39 KB
/
Copy pathtest.config.js
File metadata and controls
46 lines (39 loc) · 1.39 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
39
40
41
42
43
44
45
46
/*!
* Copyright 2023 - 2026 California Department of Motor Vehicles
* Copyright 2023 - 2026 Digital Bazaar, Inc.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
import {config} from '@bedrock/core';
import {fileURLToPath} from 'node:url';
import path from 'node:path';
import '@bedrock/https-agent';
import '@bedrock/mongodb';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
config.mocha.tests.push(path.join(__dirname, 'test', 'bedrock'));
// Bail out on first failure to focus on one test at a time
// because many subsequent failures are related to inability to
// set up test mocks/stubs after a first failure.
// Run with `npm run test:bail` to use.
config.mocha.options.bail = (process.env.MOCHA_BAIL == 'true');
// mongodb config
config.mongodb.name = 'opencred_test';
config.mongodb.host = 'localhost';
config.mongodb.port = 27017;
// drop all collections on initialization
config.mongodb.dropCollections = {};
config.mongodb.dropCollections.onInit = true;
config.mongodb.dropCollections.collections = ['Exchanges'];
// HTTPS Agent
config['https-agent'].rejectUnauthorized = false;
// OpenCred default options for tests
if(!config.opencred) {
config.opencred = {};
}
config.opencred.options = {
exchangeProtocols: ['openid4vp', 'chapi'],
recordExpiresDurationMs: 86400000, // 1 day
exchangeTtlSeconds: 900, // 15 minutes
includeQRByDefault: false,
OID4VPdefault: undefined
};