Skip to content

Commit 7f986a5

Browse files
committed
feat(exclude): refactoring
1 parent d7c2f95 commit 7f986a5

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/tests/util.test.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ describe('utils/findMatches', () => {
3939
});
4040

4141
describe('utils/removeWildCardEntries', () => {
42-
it('should move wild card entries', () => {
42+
it('should remove wild card entries', () => {
4343
const strings = [
4444
'string_1',
4545
'string_2',
@@ -52,4 +52,9 @@ describe('utils/removeWildCardEntries', () => {
5252
];
5353
expect(removeWildCardStrings(strings)).toStrictEqual(['string_1', 'string_2', 'string_3']);
5454
});
55+
56+
it('should return empty array if the strings list is empty', () => {
57+
const strings = [];
58+
expect(removeWildCardStrings(strings)).toStrictEqual([]);
59+
});
5560
});

src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,4 +130,4 @@ export function removeWildCardStrings(strings: string[]) {
130130
}
131131

132132
return strings.filter((str: string) => !(str.includes('*') || str.startsWith('!')));
133-
}
133+
}

0 commit comments

Comments
 (0)