Skip to content

Commit d3d6c2e

Browse files
committed
OEL-4185: Fix jest tests.
1 parent a4cf3e6 commit d3d6c2e

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

tools/test-utils/index.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ const { StorybookDrupalAttribute } = require(
77

88
const { DOMElement, DOMCollection } = prettyFormat.plugins;
99

10-
const escapeRegExp = (value) =>
11-
value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
10+
const escapeRegExp = (value) => value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
1211

1312
// Track attributes rendered without explicit values so snapshots can mirror
1413
// Drupal's boolean attribute output.
@@ -37,10 +36,7 @@ const getValuelessAttributeCounts = (markup) => {
3736

3837
const hasAssignment = fullAttribute.includes("=");
3938
if (!hasAssignment) {
40-
counts.set(
41-
attributeName,
42-
(counts.get(attributeName) ?? 0) + 1,
43-
);
39+
counts.set(attributeName, (counts.get(attributeName) ?? 0) + 1);
4440
}
4541
}
4642
}

0 commit comments

Comments
 (0)