We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
instanceof RegExp
1 parent 295120e commit af4a9c9Copy full SHA for af4a9c9
src/rules/no-large-snapshots.ts
@@ -54,11 +54,11 @@ const reportOnViolation = (
54
const snapshotName = getAccessorValue(node.expression.left.property);
55
56
isAllowed = allowedSnapshotsInFile.some(name => {
57
- if (name instanceof RegExp) {
58
- return name.test(snapshotName);
+ if (typeof name === 'string') {
+ return snapshotName === name;
59
}
60
61
- return snapshotName === name;
+ return name.test(snapshotName);
62
});
63
64
0 commit comments