@bernierllc/email-testing-suite 0.7.11 → 0.7.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +8 -8
- package/dist/analytics.d.ts +0 -52
- package/dist/analytics.d.ts.map +0 -1
- package/dist/analytics.js +0 -211
- package/dist/analytics.js.map +0 -1
- package/dist/best-practices.d.ts +0 -34
- package/dist/best-practices.d.ts.map +0 -1
- package/dist/best-practices.js +0 -268
- package/dist/best-practices.js.map +0 -1
- package/dist/email-testing-suite.d.ts +0 -74
- package/dist/email-testing-suite.d.ts.map +0 -1
- package/dist/email-testing-suite.js +0 -424
- package/dist/email-testing-suite.js.map +0 -1
- package/dist/errors.d.ts +0 -12
- package/dist/errors.d.ts.map +0 -1
- package/dist/errors.js +0 -25
- package/dist/errors.js.map +0 -1
- package/dist/feature-test-helpers.d.ts +0 -204
- package/dist/feature-test-helpers.d.ts.map +0 -1
- package/dist/feature-test-helpers.js +0 -375
- package/dist/feature-test-helpers.js.map +0 -1
- package/dist/index.d.ts +0 -14
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -49
- package/dist/index.js.map +0 -1
- package/dist/test-patterns.d.ts +0 -48
- package/dist/test-patterns.d.ts.map +0 -1
- package/dist/test-patterns.js +0 -132
- package/dist/test-patterns.js.map +0 -1
- package/dist/types.d.ts +0 -258
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -10
- package/dist/types.js.map +0 -1
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import type { EmailTestingSuiteConfig, EmailTemplateTest, EmailFlowTest, EmailTest, EmailTestResult, EmailFlowResult, EmailSuiteResult, TestingEnvironment, DataSchema } from './types';
|
|
2
|
-
/**
|
|
3
|
-
* Complete email testing solution with opinionated defaults
|
|
4
|
-
*/
|
|
5
|
-
export declare class EmailTestingSuite {
|
|
6
|
-
private config;
|
|
7
|
-
private mockServer;
|
|
8
|
-
private orchestrator;
|
|
9
|
-
private running;
|
|
10
|
-
private capturedEmails;
|
|
11
|
-
private testHistory;
|
|
12
|
-
constructor(config?: EmailTestingSuiteConfig);
|
|
13
|
-
/**
|
|
14
|
-
* Merge user config with opinionated defaults
|
|
15
|
-
*/
|
|
16
|
-
private mergeWithDefaults;
|
|
17
|
-
/**
|
|
18
|
-
* Start the email testing environment
|
|
19
|
-
*/
|
|
20
|
-
start(): Promise<void>;
|
|
21
|
-
/**
|
|
22
|
-
* Stop the email testing environment
|
|
23
|
-
*/
|
|
24
|
-
stop(): Promise<void>;
|
|
25
|
-
/**
|
|
26
|
-
* Reset the testing environment
|
|
27
|
-
*/
|
|
28
|
-
reset(): Promise<void>;
|
|
29
|
-
/**
|
|
30
|
-
* Test an email template with comprehensive validation
|
|
31
|
-
*/
|
|
32
|
-
testEmailTemplate(spec: EmailTemplateTest): Promise<EmailTestResult>;
|
|
33
|
-
/**
|
|
34
|
-
* Test an email flow with multiple steps
|
|
35
|
-
*/
|
|
36
|
-
testEmailFlow(flow: EmailFlowTest): Promise<EmailFlowResult>;
|
|
37
|
-
/**
|
|
38
|
-
* Run a suite of email tests
|
|
39
|
-
*/
|
|
40
|
-
runTestSuite(tests: EmailTest[]): Promise<EmailSuiteResult>;
|
|
41
|
-
/**
|
|
42
|
-
* Get the current testing environment state
|
|
43
|
-
*/
|
|
44
|
-
getTestingEnvironment(): TestingEnvironment;
|
|
45
|
-
/**
|
|
46
|
-
* Generate test data based on a schema
|
|
47
|
-
*/
|
|
48
|
-
generateTestData(schema: DataSchema): Record<string, any>;
|
|
49
|
-
/**
|
|
50
|
-
* Type guard for EmailTemplateTest
|
|
51
|
-
*/
|
|
52
|
-
private isEmailTemplateTest;
|
|
53
|
-
/**
|
|
54
|
-
* Type guard for EmailFlowTest
|
|
55
|
-
*/
|
|
56
|
-
private isEmailFlowTest;
|
|
57
|
-
/**
|
|
58
|
-
* Generate summary from test results
|
|
59
|
-
*/
|
|
60
|
-
private generateSummary;
|
|
61
|
-
/**
|
|
62
|
-
* Generate a simple UUID
|
|
63
|
-
*/
|
|
64
|
-
private generateUUID;
|
|
65
|
-
/**
|
|
66
|
-
* Get test history
|
|
67
|
-
*/
|
|
68
|
-
getTestHistory(): EmailTestResult[];
|
|
69
|
-
/**
|
|
70
|
-
* Clear test history
|
|
71
|
-
*/
|
|
72
|
-
clearTestHistory(): void;
|
|
73
|
-
}
|
|
74
|
-
//# sourceMappingURL=email-testing-suite.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"email-testing-suite.d.ts","sourceRoot":"","sources":["../src/email-testing-suite.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EACV,uBAAuB,EACvB,iBAAiB,EACjB,aAAa,EACb,SAAS,EACT,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,UAAU,EAQX,MAAM,SAAS,CAAC;AAEjB;;GAEG;AACH,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,MAAM,CAA0B;IACxC,OAAO,CAAC,UAAU,CAAM;IACxB,OAAO,CAAC,YAAY,CAAM;IAC1B,OAAO,CAAC,OAAO,CAAkB;IACjC,OAAO,CAAC,cAAc,CAAmB;IACzC,OAAO,CAAC,WAAW,CAAyB;gBAEhC,MAAM,GAAE,uBAA4B;IAIhD;;OAEG;IACH,OAAO,CAAC,iBAAiB;IA6CzB;;OAEG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAc5B;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAS3B;;OAEG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAK5B;;OAEG;IACG,iBAAiB,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,eAAe,CAAC;IAoG1E;;OAEG;IACG,aAAa,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC,eAAe,CAAC;IAmFlE;;OAEG;IACG,YAAY,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC;IA8CjE;;OAEG;IACH,qBAAqB,IAAI,kBAAkB;IAY3C;;OAEG;IACH,gBAAgB,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAsCzD;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAI3B;;OAEG;IACH,OAAO,CAAC,eAAe;IAIvB;;OAEG;IACH,OAAO,CAAC,eAAe;IA0BvB;;OAEG;IACH,OAAO,CAAC,YAAY;IAQpB;;OAEG;IACH,cAAc,IAAI,eAAe,EAAE;IAInC;;OAEG;IACH,gBAAgB,IAAI,IAAI;CAGzB"}
|
|
@@ -1,424 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
Copyright (c) 2025 Bernier LLC
|
|
4
|
-
|
|
5
|
-
This file is licensed to the client under a limited-use license.
|
|
6
|
-
The client may use and modify this code *only within the scope of the project it was delivered for*.
|
|
7
|
-
Redistribution or use in other products or commercial offerings is not permitted without written consent from Bernier LLC.
|
|
8
|
-
*/
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.EmailTestingSuite = void 0;
|
|
11
|
-
/**
|
|
12
|
-
* Complete email testing solution with opinionated defaults
|
|
13
|
-
*/
|
|
14
|
-
class EmailTestingSuite {
|
|
15
|
-
config;
|
|
16
|
-
mockServer; // MockSMTPServer instance
|
|
17
|
-
orchestrator; // EmailTestOrchestrator instance
|
|
18
|
-
running = false;
|
|
19
|
-
capturedEmails = [];
|
|
20
|
-
testHistory = [];
|
|
21
|
-
constructor(config = {}) {
|
|
22
|
-
this.config = this.mergeWithDefaults(config);
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Merge user config with opinionated defaults
|
|
26
|
-
*/
|
|
27
|
-
mergeWithDefaults(config) {
|
|
28
|
-
return {
|
|
29
|
-
smtp: {
|
|
30
|
-
port: 2525,
|
|
31
|
-
host: 'localhost',
|
|
32
|
-
...config.smtp,
|
|
33
|
-
},
|
|
34
|
-
defaults: {
|
|
35
|
-
compliance: 'US',
|
|
36
|
-
timeout: 30000,
|
|
37
|
-
retries: 3,
|
|
38
|
-
expectations: {
|
|
39
|
-
delivery: true,
|
|
40
|
-
templateCompletion: true,
|
|
41
|
-
compliance: 'US',
|
|
42
|
-
accessibility: true,
|
|
43
|
-
performance: {
|
|
44
|
-
renderTime: 2000,
|
|
45
|
-
size: '200kb',
|
|
46
|
-
deliveryTime: 5000,
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
...config.defaults,
|
|
50
|
-
},
|
|
51
|
-
validation: {
|
|
52
|
-
enabledValidators: ['template', 'compliance', 'accessibility', 'performance', 'security'],
|
|
53
|
-
strictMode: false,
|
|
54
|
-
customRules: [],
|
|
55
|
-
...config.validation,
|
|
56
|
-
},
|
|
57
|
-
reporting: {
|
|
58
|
-
enableAnalytics: true,
|
|
59
|
-
generateTrendReports: true,
|
|
60
|
-
exportFormats: ['json', 'html'],
|
|
61
|
-
retainHistory: 30,
|
|
62
|
-
...config.reporting,
|
|
63
|
-
},
|
|
64
|
-
integrations: {
|
|
65
|
-
frameworks: ['jest'],
|
|
66
|
-
webhooks: [],
|
|
67
|
-
...config.integrations,
|
|
68
|
-
},
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* Start the email testing environment
|
|
73
|
-
*/
|
|
74
|
-
async start() {
|
|
75
|
-
if (this.running) {
|
|
76
|
-
throw new Error('Email testing suite is already running');
|
|
77
|
-
}
|
|
78
|
-
// Note: In a real implementation, this would initialize:
|
|
79
|
-
// - MockSMTPServer
|
|
80
|
-
// - EmailTestOrchestrator
|
|
81
|
-
// - EmailCapture system
|
|
82
|
-
// For now, we'll simulate this
|
|
83
|
-
this.running = true;
|
|
84
|
-
this.capturedEmails = [];
|
|
85
|
-
}
|
|
86
|
-
/**
|
|
87
|
-
* Stop the email testing environment
|
|
88
|
-
*/
|
|
89
|
-
async stop() {
|
|
90
|
-
if (!this.running) {
|
|
91
|
-
return;
|
|
92
|
-
}
|
|
93
|
-
// Note: In a real implementation, this would stop all services
|
|
94
|
-
this.running = false;
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* Reset the testing environment
|
|
98
|
-
*/
|
|
99
|
-
async reset() {
|
|
100
|
-
this.capturedEmails = [];
|
|
101
|
-
// Note: In real implementation, would reset all subsystems
|
|
102
|
-
}
|
|
103
|
-
/**
|
|
104
|
-
* Test an email template with comprehensive validation
|
|
105
|
-
*/
|
|
106
|
-
async testEmailTemplate(spec) {
|
|
107
|
-
if (!this.running) {
|
|
108
|
-
throw new Error('Email testing suite is not running. Call start() first.');
|
|
109
|
-
}
|
|
110
|
-
const startTime = Date.now();
|
|
111
|
-
const validations = [];
|
|
112
|
-
const errors = [];
|
|
113
|
-
try {
|
|
114
|
-
// Validate template (simulated)
|
|
115
|
-
validations.push({
|
|
116
|
-
validator: 'template',
|
|
117
|
-
passed: true,
|
|
118
|
-
score: 100,
|
|
119
|
-
details: 'All template variables resolved successfully',
|
|
120
|
-
});
|
|
121
|
-
// Validate compliance (simulated)
|
|
122
|
-
const compliance = spec.expectations?.compliance || this.config.defaults?.compliance || 'US';
|
|
123
|
-
validations.push({
|
|
124
|
-
validator: 'compliance',
|
|
125
|
-
passed: true,
|
|
126
|
-
score: 100,
|
|
127
|
-
details: `Email meets ${compliance} compliance requirements`,
|
|
128
|
-
});
|
|
129
|
-
// Validate accessibility (simulated)
|
|
130
|
-
validations.push({
|
|
131
|
-
validator: 'accessibility',
|
|
132
|
-
passed: true,
|
|
133
|
-
score: 95,
|
|
134
|
-
details: 'Email is accessible with minor improvements possible',
|
|
135
|
-
warnings: ['Consider adding more descriptive alt text for images'],
|
|
136
|
-
});
|
|
137
|
-
// Validate performance (simulated)
|
|
138
|
-
validations.push({
|
|
139
|
-
validator: 'performance',
|
|
140
|
-
passed: true,
|
|
141
|
-
score: 90,
|
|
142
|
-
details: 'Email meets performance thresholds',
|
|
143
|
-
});
|
|
144
|
-
// Validate security (simulated)
|
|
145
|
-
validations.push({
|
|
146
|
-
validator: 'security',
|
|
147
|
-
passed: true,
|
|
148
|
-
score: 100,
|
|
149
|
-
details: 'No security issues detected',
|
|
150
|
-
});
|
|
151
|
-
// Create mock email data
|
|
152
|
-
const email = {
|
|
153
|
-
from: 'test@example.com',
|
|
154
|
-
to: spec.recipients,
|
|
155
|
-
subject: `Test: ${spec.name}`,
|
|
156
|
-
html: '<html><body>Test email</body></html>',
|
|
157
|
-
text: 'Test email',
|
|
158
|
-
timestamp: new Date().toISOString(),
|
|
159
|
-
};
|
|
160
|
-
this.capturedEmails.push(email);
|
|
161
|
-
const duration = Date.now() - startTime;
|
|
162
|
-
const averageScore = validations.reduce((sum, v) => sum + v.score, 0) / validations.length;
|
|
163
|
-
const result = {
|
|
164
|
-
success: validations.every((v) => v.passed),
|
|
165
|
-
score: averageScore,
|
|
166
|
-
testName: spec.name,
|
|
167
|
-
timestamp: new Date().toISOString(),
|
|
168
|
-
duration,
|
|
169
|
-
validations,
|
|
170
|
-
email,
|
|
171
|
-
errors: errors.length > 0 ? errors : undefined,
|
|
172
|
-
};
|
|
173
|
-
this.testHistory.push(result);
|
|
174
|
-
return result;
|
|
175
|
-
}
|
|
176
|
-
catch (error) {
|
|
177
|
-
const duration = Date.now() - startTime;
|
|
178
|
-
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
179
|
-
errors.push(errorMessage);
|
|
180
|
-
const result = {
|
|
181
|
-
success: false,
|
|
182
|
-
score: 0,
|
|
183
|
-
testName: spec.name,
|
|
184
|
-
timestamp: new Date().toISOString(),
|
|
185
|
-
duration,
|
|
186
|
-
validations,
|
|
187
|
-
errors,
|
|
188
|
-
};
|
|
189
|
-
this.testHistory.push(result);
|
|
190
|
-
return result;
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
/**
|
|
194
|
-
* Test an email flow with multiple steps
|
|
195
|
-
*/
|
|
196
|
-
async testEmailFlow(flow) {
|
|
197
|
-
if (!this.running) {
|
|
198
|
-
throw new Error('Email testing suite is not running. Call start() first.');
|
|
199
|
-
}
|
|
200
|
-
const startTime = Date.now();
|
|
201
|
-
const steps = [];
|
|
202
|
-
const assertionResults = [];
|
|
203
|
-
const errors = [];
|
|
204
|
-
try {
|
|
205
|
-
// Execute each step in the flow
|
|
206
|
-
for (let i = 0; i < flow.steps.length; i++) {
|
|
207
|
-
const step = flow.steps[i];
|
|
208
|
-
const stepStartTime = Date.now();
|
|
209
|
-
// Simulate delay
|
|
210
|
-
if (step.delay > 0) {
|
|
211
|
-
await new Promise((resolve) => setTimeout(resolve, Math.min(step.delay, 100)));
|
|
212
|
-
}
|
|
213
|
-
// Create mock email for step
|
|
214
|
-
const email = {
|
|
215
|
-
from: 'test@example.com',
|
|
216
|
-
to: ['test@example.com'],
|
|
217
|
-
subject: `Flow: ${flow.name} - Step ${i + 1}`,
|
|
218
|
-
html: `<html><body>Step ${i + 1}</body></html>`,
|
|
219
|
-
text: `Step ${i + 1}`,
|
|
220
|
-
timestamp: new Date().toISOString(),
|
|
221
|
-
};
|
|
222
|
-
this.capturedEmails.push(email);
|
|
223
|
-
const stepDuration = Date.now() - stepStartTime;
|
|
224
|
-
steps.push({
|
|
225
|
-
stepNumber: i + 1,
|
|
226
|
-
trigger: step.trigger,
|
|
227
|
-
success: true,
|
|
228
|
-
duration: stepDuration,
|
|
229
|
-
email,
|
|
230
|
-
});
|
|
231
|
-
}
|
|
232
|
-
// Run assertions
|
|
233
|
-
for (const assertion of flow.assertions) {
|
|
234
|
-
const step = steps[assertion.step - 1];
|
|
235
|
-
const passed = step && step.success;
|
|
236
|
-
assertionResults.push({
|
|
237
|
-
assertion: assertion.assertion,
|
|
238
|
-
passed,
|
|
239
|
-
message: passed ? 'Assertion passed' : 'Assertion failed',
|
|
240
|
-
});
|
|
241
|
-
}
|
|
242
|
-
const duration = Date.now() - startTime;
|
|
243
|
-
return {
|
|
244
|
-
success: assertionResults.every((a) => a.passed),
|
|
245
|
-
flowName: flow.name,
|
|
246
|
-
timestamp: new Date().toISOString(),
|
|
247
|
-
duration,
|
|
248
|
-
steps,
|
|
249
|
-
assertions: assertionResults,
|
|
250
|
-
errors: errors.length > 0 ? errors : undefined,
|
|
251
|
-
};
|
|
252
|
-
}
|
|
253
|
-
catch (error) {
|
|
254
|
-
const duration = Date.now() - startTime;
|
|
255
|
-
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
256
|
-
errors.push(errorMessage);
|
|
257
|
-
return {
|
|
258
|
-
success: false,
|
|
259
|
-
flowName: flow.name,
|
|
260
|
-
timestamp: new Date().toISOString(),
|
|
261
|
-
duration,
|
|
262
|
-
steps,
|
|
263
|
-
assertions: assertionResults,
|
|
264
|
-
errors,
|
|
265
|
-
};
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
/**
|
|
269
|
-
* Run a suite of email tests
|
|
270
|
-
*/
|
|
271
|
-
async runTestSuite(tests) {
|
|
272
|
-
if (!this.running) {
|
|
273
|
-
throw new Error('Email testing suite is not running. Call start() first.');
|
|
274
|
-
}
|
|
275
|
-
const startTime = Date.now();
|
|
276
|
-
const results = [];
|
|
277
|
-
for (const test of tests) {
|
|
278
|
-
if (this.isEmailTemplateTest(test)) {
|
|
279
|
-
const result = await this.testEmailTemplate(test);
|
|
280
|
-
results.push(result);
|
|
281
|
-
}
|
|
282
|
-
else if (this.isEmailFlowTest(test)) {
|
|
283
|
-
// Convert flow result to test result for summary
|
|
284
|
-
const flowResult = await this.testEmailFlow(test);
|
|
285
|
-
const testResult = {
|
|
286
|
-
success: flowResult.success,
|
|
287
|
-
score: flowResult.success ? 100 : 0,
|
|
288
|
-
testName: flowResult.flowName,
|
|
289
|
-
timestamp: flowResult.timestamp,
|
|
290
|
-
duration: flowResult.duration,
|
|
291
|
-
validations: [],
|
|
292
|
-
errors: flowResult.errors,
|
|
293
|
-
};
|
|
294
|
-
results.push(testResult);
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
const duration = Date.now() - startTime;
|
|
298
|
-
const passedTests = results.filter((r) => r.success).length;
|
|
299
|
-
const failedTests = results.length - passedTests;
|
|
300
|
-
const summary = this.generateSummary(results);
|
|
301
|
-
return {
|
|
302
|
-
success: failedTests === 0,
|
|
303
|
-
totalTests: results.length,
|
|
304
|
-
passedTests,
|
|
305
|
-
failedTests,
|
|
306
|
-
duration,
|
|
307
|
-
timestamp: new Date().toISOString(),
|
|
308
|
-
results,
|
|
309
|
-
summary,
|
|
310
|
-
};
|
|
311
|
-
}
|
|
312
|
-
/**
|
|
313
|
-
* Get the current testing environment state
|
|
314
|
-
*/
|
|
315
|
-
getTestingEnvironment() {
|
|
316
|
-
return {
|
|
317
|
-
smtpServer: {
|
|
318
|
-
host: this.config.smtp?.host || 'localhost',
|
|
319
|
-
port: this.config.smtp?.port || 2525,
|
|
320
|
-
running: this.running,
|
|
321
|
-
},
|
|
322
|
-
capturedEmails: [...this.capturedEmails],
|
|
323
|
-
config: this.config,
|
|
324
|
-
};
|
|
325
|
-
}
|
|
326
|
-
/**
|
|
327
|
-
* Generate test data based on a schema
|
|
328
|
-
*/
|
|
329
|
-
generateTestData(schema) {
|
|
330
|
-
const data = {};
|
|
331
|
-
for (const [key, field] of Object.entries(schema)) {
|
|
332
|
-
if (field.default !== undefined) {
|
|
333
|
-
data[key] = field.default;
|
|
334
|
-
}
|
|
335
|
-
else {
|
|
336
|
-
switch (field.type) {
|
|
337
|
-
case 'string':
|
|
338
|
-
data[key] = `test-${key}`;
|
|
339
|
-
break;
|
|
340
|
-
case 'number':
|
|
341
|
-
data[key] = field.min || 0;
|
|
342
|
-
break;
|
|
343
|
-
case 'boolean':
|
|
344
|
-
data[key] = true;
|
|
345
|
-
break;
|
|
346
|
-
case 'date':
|
|
347
|
-
data[key] = new Date().toISOString();
|
|
348
|
-
break;
|
|
349
|
-
case 'email':
|
|
350
|
-
data[key] = `test-${key}@example.com`;
|
|
351
|
-
break;
|
|
352
|
-
case 'url':
|
|
353
|
-
data[key] = `https://example.com/${key}`;
|
|
354
|
-
break;
|
|
355
|
-
case 'uuid':
|
|
356
|
-
data[key] = this.generateUUID();
|
|
357
|
-
break;
|
|
358
|
-
default:
|
|
359
|
-
data[key] = null;
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
return data;
|
|
364
|
-
}
|
|
365
|
-
/**
|
|
366
|
-
* Type guard for EmailTemplateTest
|
|
367
|
-
*/
|
|
368
|
-
isEmailTemplateTest(test) {
|
|
369
|
-
return 'template' in test && 'recipients' in test;
|
|
370
|
-
}
|
|
371
|
-
/**
|
|
372
|
-
* Type guard for EmailFlowTest
|
|
373
|
-
*/
|
|
374
|
-
isEmailFlowTest(test) {
|
|
375
|
-
return 'steps' in test && 'assertions' in test;
|
|
376
|
-
}
|
|
377
|
-
/**
|
|
378
|
-
* Generate summary from test results
|
|
379
|
-
*/
|
|
380
|
-
generateSummary(results) {
|
|
381
|
-
const scores = results.map((r) => r.score);
|
|
382
|
-
const averageScore = scores.reduce((sum, score) => sum + score, 0) / scores.length || 0;
|
|
383
|
-
const passedTests = results.filter((r) => r.success).length;
|
|
384
|
-
const complianceRate = (passedTests / results.length) * 100 || 0;
|
|
385
|
-
const durations = results.map((r) => r.duration);
|
|
386
|
-
const averageRenderTime = durations.reduce((sum, d) => sum + d, 0) / durations.length || 0;
|
|
387
|
-
const performanceMetrics = {
|
|
388
|
-
averageRenderTime,
|
|
389
|
-
averageDeliveryTime: averageRenderTime * 1.5,
|
|
390
|
-
averageSize: 50000, // Mock value
|
|
391
|
-
};
|
|
392
|
-
const commonIssues = [];
|
|
393
|
-
return {
|
|
394
|
-
averageScore,
|
|
395
|
-
complianceRate,
|
|
396
|
-
performanceMetrics,
|
|
397
|
-
commonIssues,
|
|
398
|
-
};
|
|
399
|
-
}
|
|
400
|
-
/**
|
|
401
|
-
* Generate a simple UUID
|
|
402
|
-
*/
|
|
403
|
-
generateUUID() {
|
|
404
|
-
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {
|
|
405
|
-
const r = (Math.random() * 16) | 0;
|
|
406
|
-
const v = c === 'x' ? r : (r & 0x3) | 0x8;
|
|
407
|
-
return v.toString(16);
|
|
408
|
-
});
|
|
409
|
-
}
|
|
410
|
-
/**
|
|
411
|
-
* Get test history
|
|
412
|
-
*/
|
|
413
|
-
getTestHistory() {
|
|
414
|
-
return [...this.testHistory];
|
|
415
|
-
}
|
|
416
|
-
/**
|
|
417
|
-
* Clear test history
|
|
418
|
-
*/
|
|
419
|
-
clearTestHistory() {
|
|
420
|
-
this.testHistory = [];
|
|
421
|
-
}
|
|
422
|
-
}
|
|
423
|
-
exports.EmailTestingSuite = EmailTestingSuite;
|
|
424
|
-
//# sourceMappingURL=email-testing-suite.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"email-testing-suite.js","sourceRoot":"","sources":["../src/email-testing-suite.ts"],"names":[],"mappings":";AAAA;;;;;;EAME;;;AAqBF;;GAEG;AACH,MAAa,iBAAiB;IACpB,MAAM,CAA0B;IAChC,UAAU,CAAM,CAAC,0BAA0B;IAC3C,YAAY,CAAM,CAAC,iCAAiC;IACpD,OAAO,GAAY,KAAK,CAAC;IACzB,cAAc,GAAgB,EAAE,CAAC;IACjC,WAAW,GAAsB,EAAE,CAAC;IAE5C,YAAY,SAAkC,EAAE;QAC9C,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC;IAC/C,CAAC;IAED;;OAEG;IACK,iBAAiB,CAAC,MAA+B;QACvD,OAAO;YACL,IAAI,EAAE;gBACJ,IAAI,EAAE,IAAI;gBACV,IAAI,EAAE,WAAW;gBACjB,GAAG,MAAM,CAAC,IAAI;aACf;YACD,QAAQ,EAAE;gBACR,UAAU,EAAE,IAAI;gBAChB,OAAO,EAAE,KAAK;gBACd,OAAO,EAAE,CAAC;gBACV,YAAY,EAAE;oBACZ,QAAQ,E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' | 'INVALID_INPUT' | 'OPERATION_FAILED';
|
|
2
|
-
export interface EmailTestingSuiteErrorOptions {
|
|
3
|
-
cause?: Error;
|
|
4
|
-
code?: EmailTestingSuiteErrorCode;
|
|
5
|
-
context?: Record<string, unknown>;
|
|
6
|
-
}
|
|
7
|
-
export declare class EmailTestingSuiteError extends Error {
|
|
8
|
-
readonly code: EmailTestingSuiteErrorCode;
|
|
9
|
-
readonly context?: Record<string, unknown>;
|
|
10
|
-
constructor(message: string, options?: EmailTestingSuiteErrorOptions);
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=errors.d.ts.map
|
package/dist/errors.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAQA,MAAM,MAAM,0BAA0B,GAClC,2BAA2B,GAC3B,eAAe,GACf,kBAAkB,CAAC;AAEvB,MAAM,WAAW,6BAA6B;IAC5C,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,IAAI,CAAC,EAAE,0BAA0B,CAAC;IAClC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnC;AAED,qBAAa,sBAAuB,SAAQ,KAAK;IAC/C,QAAQ,CAAC,IAAI,EAAE,0BAA0B,CAAC;IAC1C,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;gBAE/B,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,6BAA6B;CASrE"}
|
package/dist/errors.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
Copyright (c) 2025 Bernier LLC
|
|
4
|
-
|
|
5
|
-
This file is licensed to the client under a limited-use license.
|
|
6
|
-
The client may use and modify this code *only within the scope of the project it was delivered for*.
|
|
7
|
-
Redistribution or use in other products or commercial offerings is not permitted without written consent from Bernier LLC.
|
|
8
|
-
*/
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.EmailTestingSuiteError = void 0;
|
|
11
|
-
class EmailTestingSuiteError extends Error {
|
|
12
|
-
code;
|
|
13
|
-
context;
|
|
14
|
-
constructor(message, options) {
|
|
15
|
-
super(message, options?.cause ? { cause: options.cause } : undefined);
|
|
16
|
-
this.name = 'EmailTestingSuiteError';
|
|
17
|
-
this.code = options?.code ?? 'EMAIL_TESTING_SUITE_ERROR';
|
|
18
|
-
if (options?.context !== undefined) {
|
|
19
|
-
this.context = options.context;
|
|
20
|
-
}
|
|
21
|
-
Error.captureStackTrace?.(this, this.constructor);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
exports.EmailTestingSuiteError = EmailTestingSuiteError;
|
|
25
|
-
//# sourceMappingURL=errors.js.map
|
package/dist/errors.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":";AAAA;;;;;;EAME;;;AAaF,MAAa,sBAAuB,SAAQ,KAAK;IACtC,IAAI,CAA6B;IACjC,OAAO,CAA2B;IAE3C,YAAY,OAAe,EAAE,OAAuC;QAClE,KAAK,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;QACtE,IAAI,CAAC,IAAI,GAAG,wBAAwB,CAAC;QACrC,IAAI,CAAC,IAAI,GAAG,OAAO,EAAE,IAAI,IAAI,2BAA2B,CAAC;QACzD,IAAI,OAAO,EAAE,OAAO,KAAK,SAAS,EAAE,CAAC;YACnC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;QACjC,CAAC;QACD,KAAK,CAAC,iBAAiB,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;IACpD,CAAC;CACF;AAbD,wDAaC"}
|