-
-
Notifications
You must be signed in to change notification settings - Fork 751
Expand file tree
/
Copy pathcodecept.bdd.masking.js
More file actions
39 lines (39 loc) · 955 Bytes
/
codecept.bdd.masking.js
File metadata and controls
39 lines (39 loc) · 955 Bytes
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
exports.config = {
tests: './*_no_test.js',
timeout: 10000,
output: './output',
helpers: {
BDD: {
require: './support/bdd_helper.js',
},
},
// New masking configuration with custom patterns
maskSensitiveData: {
enabled: true,
patterns: [
{
name: 'Email',
regex: /(\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b)/gi,
mask: '[MASKED_EMAIL]',
},
{
name: 'Credit Card',
regex: /\b(?:\d{4}[- ]?){3}\d{4}\b/g,
mask: '[MASKED_CARD]',
},
{
name: 'Phone',
regex: /(\+?1[-.\s]?)?\(?([0-9]{3})\)?[-.\s]?([0-9]{3})[-.\s]?([0-9]{4})/g,
mask: '[MASKED_PHONE]',
},
],
},
gherkin: {
features: './features/masking.feature',
steps: ['./features/step_definitions/my_steps.js', './features/step_definitions/my_other_steps.js'],
},
include: {},
bootstrap: false,
mocha: {},
name: 'sandbox-masking',
}