@testomatio/reporter 1.6.8 → 1.6.9-beta.1-metadata-formatting
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/lib/client.js +4 -3
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -168,17 +168,18 @@ class Client {
|
|
|
168
168
|
// stringify meta values and limit keys and values length to 255
|
|
169
169
|
if (meta) {
|
|
170
170
|
for (const key in meta) {
|
|
171
|
-
if (key === undefined || key === null) continue;
|
|
172
171
|
if (typeof meta[key] === 'object') {
|
|
173
172
|
meta[key] = JSON.stringify(meta[key]);
|
|
174
173
|
}
|
|
174
|
+
|
|
175
175
|
// cut values
|
|
176
|
-
if (meta[key]
|
|
176
|
+
if (meta[key]?.length > 255) {
|
|
177
177
|
meta[key] = meta[key].substring(0, 255);
|
|
178
178
|
debug(APP_PREFIX, `Meta info value "${meta[key]}" is too long, trimmed to 255 characters`);
|
|
179
179
|
}
|
|
180
|
+
|
|
180
181
|
// cut keys
|
|
181
|
-
if (key
|
|
182
|
+
if (key?.length > 255) {
|
|
182
183
|
const newKey = key.substring(0, 255);
|
|
183
184
|
meta[newKey] = meta[key];
|
|
184
185
|
delete meta[key];
|