Skip to content

Commit 176ddfa

Browse files
committed
test: adjust scanDiff test to check that literals are escaped
1 parent cd63bf5 commit 176ddfa

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/processors/scanDiff.test.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,15 @@ index 8b97e49..de18d43 100644
5353
Project to test gitproxy
5454
+AKIAIOSFODNN7EXAMPLE
5555
+AKIAIOSFODNN8EXAMPLE
56-
+blockedTestLiteral
56+
+emdedded_blocked.Te$t.Literal?
5757
`;
5858
};
5959
describe('Scan commit diff...', async () => {
6060
privateOrganizations[0] = 'private-org-test';
6161
commitConfig.diff = {
6262
block: {
63-
literals: ['blockedTestLiteral'],
63+
//n.b. the example literal includes special chars that would be interpreted as RegEx if not escaped properly
64+
literals: ['blocked.Te$t.Literal?'],
6465
patterns: [],
6566
providers: {
6667
'AWS (Amazon Web Services) Access Key ID':

0 commit comments

Comments
 (0)