jest-html-reporter 2.6.2 → 2.8.2
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/README.md +1 -0
- package/dist/htmlreporter.js +373 -0
- package/dist/htmlreporter.js.map +1 -0
- package/dist/index.js +602 -0
- package/dist/index.js.map +1 -0
- package/dist/main.js +104 -18
- package/dist/main.min.js +1 -1
- package/dist/sortingMethods.js +57 -0
- package/dist/sortingMethods.js.map +1 -0
- package/package.json +5 -5
- package/style/darkTheme.css +3 -0
- package/style/defaultTheme.css +3 -0
- package/style/lightTheme.css +3 -0
package/README.md
CHANGED
|
@@ -75,6 +75,7 @@ Please note that all configuration properties are optional.
|
|
|
75
75
|
| `sort` | `STRING` | Sorts the test results using the given method. Available sorting methods can be found in the [documentation](https://github.com/Hargne/jest-html-reporter/wiki/Sorting-Methods). | `"default"`
|
|
76
76
|
| `statusIgnoreFilter` | `STRING` | A comma-separated string of the test result statuses that should be ignored when rendering the report. Available statuses are: `"passed"`, `"pending"`, `"failed"` | `null`
|
|
77
77
|
| `boilerplate` | `STRING` | The path to a boilerplate file that should be used to render the body of the test results into. `{jesthtmlreporter-content}` within the boilerplate will be replaced with the test results | `null`
|
|
78
|
+
| `append` | `BOOLEAN` | If set to true, new test results will be appended to the existing test report | `false`
|
|
78
79
|
|
|
79
80
|
> *The plugin will search for the *styleOverridePath* from the root directory, therefore there is no need to prepend the string with `./` or `../` - You can read more about the themes in the [documentation](https://github.com/Hargne/jest-html-reporter/wiki/Test-Report-Themes).
|
|
80
81
|
|
|
@@ -0,0 +1,373 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const dateformat_1 = __importDefault(require("dateformat"));
|
|
7
|
+
const fs_1 = __importDefault(require("fs"));
|
|
8
|
+
const mkdirp_1 = __importDefault(require("mkdirp"));
|
|
9
|
+
const path_1 = __importDefault(require("path"));
|
|
10
|
+
const strip_ansi_1 = __importDefault(require("strip-ansi"));
|
|
11
|
+
const xmlbuilder_1 = __importDefault(require("xmlbuilder"));
|
|
12
|
+
const sortingMethods_1 = require("./sortingMethods");
|
|
13
|
+
class HTMLReporter {
|
|
14
|
+
constructor(testData, options) {
|
|
15
|
+
this.testData = testData;
|
|
16
|
+
this.setupConfig(options);
|
|
17
|
+
}
|
|
18
|
+
async generate() {
|
|
19
|
+
const report = await this.renderTestReport();
|
|
20
|
+
const outputPath = this.getConfigValue("outputPath");
|
|
21
|
+
await mkdirp_1.default(path_1.default.dirname(outputPath));
|
|
22
|
+
await fs_1.default.writeFile(outputPath, report, writeFileError => {
|
|
23
|
+
if (writeFileError) {
|
|
24
|
+
throw new Error(`Something went wrong when creating the file: ${writeFileError}`);
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
this.logMessage("success", `Report generated (${outputPath})`);
|
|
28
|
+
}
|
|
29
|
+
async renderTestReport() {
|
|
30
|
+
try {
|
|
31
|
+
// Generate the content of the test report
|
|
32
|
+
const reportBody = await this.renderTestReportBody();
|
|
33
|
+
// --
|
|
34
|
+
// Boilerplate Option
|
|
35
|
+
if (!!this.getConfigValue("boilerplate")) {
|
|
36
|
+
const boilerplateContent = await this.getFileContent(this.getConfigValue("boilerplate"));
|
|
37
|
+
return boilerplateContent.replace("{jesthtmlreporter-content}", reportBody.toString());
|
|
38
|
+
}
|
|
39
|
+
// --
|
|
40
|
+
// Create HTML and apply reporter content
|
|
41
|
+
const HTMLBase = {
|
|
42
|
+
html: {
|
|
43
|
+
head: {
|
|
44
|
+
meta: { "@charset": "utf-8" },
|
|
45
|
+
title: { "#text": this.getConfigValue("pageTitle") },
|
|
46
|
+
style: undefined,
|
|
47
|
+
link: undefined
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
// Default to the currently set theme
|
|
52
|
+
let stylesheetFilePath = path_1.default.join(__dirname, `../style/${this.getConfigValue("theme")}.css`);
|
|
53
|
+
// Overriding stylesheet
|
|
54
|
+
if (this.getConfigValue("styleOverridePath")) {
|
|
55
|
+
stylesheetFilePath = this.getConfigValue("styleOverridePath");
|
|
56
|
+
}
|
|
57
|
+
// Decide whether to inline the CSS or not
|
|
58
|
+
const inlineCSS = !this.getConfigValue("useCssFile") &&
|
|
59
|
+
!!!this.getConfigValue("styleOverridePath");
|
|
60
|
+
if (inlineCSS) {
|
|
61
|
+
const stylesheetContent = await fs_1.default.readFileSync(stylesheetFilePath, "utf8");
|
|
62
|
+
HTMLBase.html.head.style = {
|
|
63
|
+
"@type": "text/css",
|
|
64
|
+
"#text": stylesheetContent
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
HTMLBase.html.head.link = {
|
|
69
|
+
"@rel": "stylesheet",
|
|
70
|
+
"@type": "text/css",
|
|
71
|
+
"@href": stylesheetFilePath
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
const report = xmlbuilder_1.default.create(HTMLBase);
|
|
75
|
+
report.ele("body").raw(reportBody.toString());
|
|
76
|
+
return report;
|
|
77
|
+
}
|
|
78
|
+
catch (e) {
|
|
79
|
+
this.logMessage("error", e);
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
async renderTestReportBody() {
|
|
84
|
+
try {
|
|
85
|
+
if (!this.testData) {
|
|
86
|
+
throw Error("No test data provided");
|
|
87
|
+
}
|
|
88
|
+
// HTML Body
|
|
89
|
+
const reportBody = xmlbuilder_1.default.begin().element("div", {
|
|
90
|
+
id: "jesthtml-content"
|
|
91
|
+
});
|
|
92
|
+
/**
|
|
93
|
+
* Page Header
|
|
94
|
+
*/
|
|
95
|
+
const header = reportBody.ele("header");
|
|
96
|
+
// Page Title
|
|
97
|
+
header.ele("h1", { id: "title" }, this.getConfigValue("pageTitle"));
|
|
98
|
+
// Logo
|
|
99
|
+
const logo = this.getConfigValue("logo");
|
|
100
|
+
if (logo) {
|
|
101
|
+
header.ele("img", { id: "logo", src: logo });
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Meta-Data
|
|
105
|
+
*/
|
|
106
|
+
const metaDataContainer = reportBody.ele("div", {
|
|
107
|
+
id: "metadata-container"
|
|
108
|
+
});
|
|
109
|
+
// Timestamp
|
|
110
|
+
const timestamp = new Date(this.testData.startTime);
|
|
111
|
+
metaDataContainer.ele("div", { id: "timestamp" }, `Start: ${dateformat_1.default(timestamp.toDateString(), this.getConfigValue("dateFormat"))}`);
|
|
112
|
+
// Test Summary
|
|
113
|
+
metaDataContainer.ele("div", { id: "summary" }, `${this.testData.numTotalTests} tests -- ${this.testData.numPassedTests} passed / ${this.testData.numFailedTests} failed / ${this.testData.numPendingTests} pending`);
|
|
114
|
+
/**
|
|
115
|
+
* Apply any given sorting method to the test results
|
|
116
|
+
*/
|
|
117
|
+
const sortedTestResults = sortingMethods_1.sortTestResults(this.testData.testResults, this.getConfigValue("sort"));
|
|
118
|
+
/**
|
|
119
|
+
* Setup ignored test result statuses
|
|
120
|
+
*/
|
|
121
|
+
const statusIgnoreFilter = this.getConfigValue("statusIgnoreFilter");
|
|
122
|
+
let ignoredStatuses = [];
|
|
123
|
+
if (statusIgnoreFilter) {
|
|
124
|
+
ignoredStatuses = statusIgnoreFilter
|
|
125
|
+
.replace(/\s/g, "")
|
|
126
|
+
.toLowerCase()
|
|
127
|
+
.split(",");
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Test Suites
|
|
131
|
+
*/
|
|
132
|
+
sortedTestResults.map(suite => {
|
|
133
|
+
// Filter out the test results with statuses that equals the statusIgnoreFilter
|
|
134
|
+
for (const [i, result] of suite.testResults.entries()) {
|
|
135
|
+
if (ignoredStatuses.includes(result.status)) {
|
|
136
|
+
suite.testResults.splice(i, 1);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
// Ignore this suite if there are no results
|
|
140
|
+
if (!suite.testResults || suite.testResults.length <= 0) {
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
// Suite Information
|
|
144
|
+
const suiteInfo = reportBody.ele("div", { class: "suite-info" });
|
|
145
|
+
// Suite Path
|
|
146
|
+
suiteInfo.ele("div", { class: "suite-path" }, suite.testFilePath);
|
|
147
|
+
// Suite execution time
|
|
148
|
+
const executionTime = (suite.perfStats.end - suite.perfStats.start) / 1000;
|
|
149
|
+
suiteInfo.ele("div", { class: `suite-time${executionTime > 5 ? " warn" : ""}` }, `${executionTime}s`);
|
|
150
|
+
// Suite Test Table
|
|
151
|
+
const suiteTable = reportBody.ele("table", {
|
|
152
|
+
class: "suite-table",
|
|
153
|
+
cellspacing: "0",
|
|
154
|
+
cellpadding: "0"
|
|
155
|
+
});
|
|
156
|
+
// Test Results
|
|
157
|
+
suite.testResults.forEach(test => {
|
|
158
|
+
const testTr = suiteTable.ele("tr", { class: test.status });
|
|
159
|
+
// Suite Name(s)
|
|
160
|
+
testTr.ele("td", { class: "suite" }, test.ancestorTitles.join(" > "));
|
|
161
|
+
// Test name
|
|
162
|
+
const testTitleTd = testTr.ele("td", { class: "test" }, test.title);
|
|
163
|
+
// Test Failure Messages
|
|
164
|
+
if (test.failureMessages &&
|
|
165
|
+
this.getConfigValue("includeFailureMsg")) {
|
|
166
|
+
const failureMsgDiv = testTitleTd.ele("div", {
|
|
167
|
+
class: "failureMessages"
|
|
168
|
+
});
|
|
169
|
+
test.failureMessages.forEach(failureMsg => {
|
|
170
|
+
failureMsgDiv.ele("pre", { class: "failureMsg" }, strip_ansi_1.default(failureMsg));
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
// Append data to <tr>
|
|
174
|
+
testTr.ele("td", { class: "result" }, test.status === "passed"
|
|
175
|
+
? `${test.status} in ${test.duration / 1000}s`
|
|
176
|
+
: test.status);
|
|
177
|
+
});
|
|
178
|
+
// All console.logs caught during the test run
|
|
179
|
+
if (this.consoleLogList &&
|
|
180
|
+
this.consoleLogList.length > 0 &&
|
|
181
|
+
this.getConfigValue("includeConsoleLog")) {
|
|
182
|
+
// Filter out the logs for this test file path
|
|
183
|
+
const filteredConsoleLogs = this.consoleLogList.find(logs => logs.filePath === suite.testFilePath);
|
|
184
|
+
if (filteredConsoleLogs && filteredConsoleLogs.logs.length > 0) {
|
|
185
|
+
// Console Log Container
|
|
186
|
+
const consoleLogContainer = reportBody.ele("div", {
|
|
187
|
+
class: "suite-consolelog"
|
|
188
|
+
});
|
|
189
|
+
// Console Log Header
|
|
190
|
+
consoleLogContainer.ele("div", { class: "suite-consolelog-header" }, "Console Log");
|
|
191
|
+
// Apply the logs to the body
|
|
192
|
+
filteredConsoleLogs.logs.forEach(log => {
|
|
193
|
+
const logElement = consoleLogContainer.ele("div", {
|
|
194
|
+
class: "suite-consolelog-item"
|
|
195
|
+
});
|
|
196
|
+
logElement.ele("pre", { class: "suite-consolelog-item-origin" }, strip_ansi_1.default(log.origin));
|
|
197
|
+
logElement.ele("pre", { class: "suite-consolelog-item-message" }, strip_ansi_1.default(log.message));
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
});
|
|
202
|
+
return reportBody;
|
|
203
|
+
}
|
|
204
|
+
catch (e) {
|
|
205
|
+
this.logMessage("error", e);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Fetch and setup configuration
|
|
210
|
+
*/
|
|
211
|
+
setupConfig(options) {
|
|
212
|
+
this.config = {
|
|
213
|
+
append: {
|
|
214
|
+
defaultValue: false,
|
|
215
|
+
environmentVariable: "JEST_HTML_REPORTER_APPEND",
|
|
216
|
+
configValue: options.append
|
|
217
|
+
},
|
|
218
|
+
boilerplate: {
|
|
219
|
+
defaultValue: null,
|
|
220
|
+
environmentVariable: "JEST_HTML_REPORTER_BOILERPLATE",
|
|
221
|
+
configValue: options.boilerplate
|
|
222
|
+
},
|
|
223
|
+
customScriptPath: {
|
|
224
|
+
defaultValue: null,
|
|
225
|
+
environmentVariable: "JEST_HTML_REPORTER_CUSTOM_SCRIPT_PATH",
|
|
226
|
+
configValue: options.customScriptPath
|
|
227
|
+
},
|
|
228
|
+
dateFormat: {
|
|
229
|
+
defaultValue: "yyyy-mm-dd HH:MM:ss",
|
|
230
|
+
environmentVariable: "JEST_HTML_REPORTER_DATE_FORMAT",
|
|
231
|
+
configValue: options.dateFormat
|
|
232
|
+
},
|
|
233
|
+
executionTimeWarningThreshold: {
|
|
234
|
+
defaultValue: 5,
|
|
235
|
+
environmentVariable: "JEST_HTML_REPORTER_EXECUTION_TIME_WARNING_THRESHOLD",
|
|
236
|
+
configValue: options.executionTimeWarningThreshold
|
|
237
|
+
},
|
|
238
|
+
logo: {
|
|
239
|
+
defaultValue: null,
|
|
240
|
+
environmentVariable: "JEST_HTML_REPORTER_LOGO",
|
|
241
|
+
configValue: options.logo
|
|
242
|
+
},
|
|
243
|
+
includeFailureMsg: {
|
|
244
|
+
defaultValue: false,
|
|
245
|
+
environmentVariable: "JEST_HTML_REPORTER_INCLUDE_FAILURE_MSG",
|
|
246
|
+
configValue: options.includeFailureMsg
|
|
247
|
+
},
|
|
248
|
+
includeConsoleLog: {
|
|
249
|
+
defaultValue: false,
|
|
250
|
+
environmentVariable: "JEST_HTML_REPORTER_INCLUDE_CONSOLE_LOG",
|
|
251
|
+
configValue: options.includeConsoleLog
|
|
252
|
+
},
|
|
253
|
+
outputPath: {
|
|
254
|
+
defaultValue: path_1.default.join(process.cwd(), "test-report.html"),
|
|
255
|
+
environmentVariable: "JEST_HTML_REPORTER_OUTPUT_PATH",
|
|
256
|
+
configValue: options.outputPath
|
|
257
|
+
},
|
|
258
|
+
pageTitle: {
|
|
259
|
+
defaultValue: "Test Report",
|
|
260
|
+
environmentVariable: "JEST_HTML_REPORTER_PAGE_TITLE",
|
|
261
|
+
configValue: options.pageTitle
|
|
262
|
+
},
|
|
263
|
+
theme: {
|
|
264
|
+
defaultValue: "defaultTheme",
|
|
265
|
+
environmentVariable: "JEST_HTML_REPORTER_THEME",
|
|
266
|
+
configValue: options.theme
|
|
267
|
+
},
|
|
268
|
+
sort: {
|
|
269
|
+
defaultValue: null,
|
|
270
|
+
environmentVariable: "JEST_HTML_REPORTER_SORT",
|
|
271
|
+
configValue: options.sort
|
|
272
|
+
},
|
|
273
|
+
statusIgnoreFilter: {
|
|
274
|
+
defaultValue: null,
|
|
275
|
+
environmentVariable: "JEST_HTML_REPORTER_STATUS_FILTER",
|
|
276
|
+
configValue: options.statusIgnoreFilter
|
|
277
|
+
},
|
|
278
|
+
styleOverridePath: {
|
|
279
|
+
defaultValue: null,
|
|
280
|
+
environmentVariable: "JEST_HTML_REPORTER_STYLE_OVERRIDE_PATH",
|
|
281
|
+
configValue: options.styleOverridePath
|
|
282
|
+
},
|
|
283
|
+
useCssFile: {
|
|
284
|
+
defaultValue: false,
|
|
285
|
+
environmentVariable: "JEST_HTML_REPORTER_USE_CSS_FILE",
|
|
286
|
+
configValue: options.useCssFile
|
|
287
|
+
}
|
|
288
|
+
};
|
|
289
|
+
// Attempt to collect and assign config settings from jesthtmlreporter.config.json
|
|
290
|
+
try {
|
|
291
|
+
const jesthtmlreporterconfig = fs_1.default.readFileSync(path_1.default.join(process.cwd(), "jesthtmlreporter.config.json"), "utf8");
|
|
292
|
+
if (jesthtmlreporterconfig) {
|
|
293
|
+
const parsedConfig = JSON.parse(jesthtmlreporterconfig);
|
|
294
|
+
for (const key of Object.keys(parsedConfig)) {
|
|
295
|
+
if (this.config[key]) {
|
|
296
|
+
this.config[key].configValue =
|
|
297
|
+
parsedConfig[key];
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
return;
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
catch (e) {
|
|
304
|
+
/** do nothing */
|
|
305
|
+
}
|
|
306
|
+
// If above method did not work we attempt to check package.json
|
|
307
|
+
try {
|
|
308
|
+
const packageJson = fs_1.default.readFileSync(path_1.default.join(process.cwd(), "package.json"), "utf8");
|
|
309
|
+
if (packageJson) {
|
|
310
|
+
const parsedConfig = JSON.parse(packageJson)["jest-html-reporter"];
|
|
311
|
+
for (const key of Object.keys(parsedConfig)) {
|
|
312
|
+
if (this.config[key]) {
|
|
313
|
+
this.config[key].configValue =
|
|
314
|
+
parsedConfig[key];
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
catch (e) {
|
|
320
|
+
/** do nothing */
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
/**
|
|
324
|
+
* Returns the configurated value from the config in the following priority order:
|
|
325
|
+
* Environment Variable > JSON configured value > Default value
|
|
326
|
+
* @param key
|
|
327
|
+
*/
|
|
328
|
+
getConfigValue(key) {
|
|
329
|
+
const option = this.config[key];
|
|
330
|
+
if (!option) {
|
|
331
|
+
return;
|
|
332
|
+
}
|
|
333
|
+
if (process.env[option.environmentVariable]) {
|
|
334
|
+
return process.env[option.environmentVariable];
|
|
335
|
+
}
|
|
336
|
+
return option.configValue || option.defaultValue;
|
|
337
|
+
}
|
|
338
|
+
async getFileContent(filePath) {
|
|
339
|
+
try {
|
|
340
|
+
fs_1.default.readFile(filePath, "utf8", (err, content) => {
|
|
341
|
+
if (err) {
|
|
342
|
+
throw Error(`Could not locate file: '${filePath}': ${err}`);
|
|
343
|
+
}
|
|
344
|
+
return content;
|
|
345
|
+
});
|
|
346
|
+
}
|
|
347
|
+
catch (e) {
|
|
348
|
+
this.logMessage("error", e);
|
|
349
|
+
return;
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
/**
|
|
353
|
+
* Method for logging to the terminal
|
|
354
|
+
* @param type
|
|
355
|
+
* @param message
|
|
356
|
+
* @param ignoreConsole
|
|
357
|
+
*/
|
|
358
|
+
logMessage(type = "default", message, ignoreConsole) {
|
|
359
|
+
const logTypes = {
|
|
360
|
+
default: "\x1b[37m%s\x1b[0m",
|
|
361
|
+
success: "\x1b[32m%s\x1b[0m",
|
|
362
|
+
error: "\x1b[31m%s\x1b[0m"
|
|
363
|
+
};
|
|
364
|
+
const logColor = !logTypes[type] ? logTypes.default : logTypes[type];
|
|
365
|
+
const logMsg = `jest-html-reporter >> ${message}`;
|
|
366
|
+
if (!ignoreConsole) {
|
|
367
|
+
console.log(logColor, logMsg);
|
|
368
|
+
}
|
|
369
|
+
return { logColor, logMsg }; // Return for testing purposes
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
exports.default = HTMLReporter;
|
|
373
|
+
//# sourceMappingURL=htmlreporter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"htmlreporter.js","sourceRoot":"","sources":["../src/htmlreporter.ts"],"names":[],"mappings":";;;;;AACA,4DAAoC;AACpC,4CAAoB;AACpB,oDAA4B;AAC5B,gDAAwB;AAOxB,4DAAmC;AACnC,4DAAoD;AAEpD,qDAAmD;AAEnD,MAAM,YAAY;IAKhB,YAAY,QAA0B,EAAE,OAAiC;QACvE,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IAC5B,CAAC;IAEM,KAAK,CAAC,QAAQ;QACnB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,gBAAgB,EAAE,CAAC;QAE7C,MAAM,UAAU,GAAG,IAAI,CAAC,cAAc,CAAC,YAAY,CAAW,CAAC;QAC/D,MAAM,gBAAM,CAAC,cAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC;QACvC,MAAM,YAAE,CAAC,SAAS,CAAC,UAAU,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE;YACtD,IAAI,cAAc,EAAE;gBAClB,MAAM,IAAI,KAAK,CACb,gDAAgD,cAAc,EAAE,CACjE,CAAC;aACH;QACH,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,UAAU,CAAC,SAAS,EAAE,qBAAqB,UAAU,GAAG,CAAC,CAAC;IAC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