Skip to content

Commit 1cd0d23

Browse files
feat: ignore files ending in .*js (#798)
1 parent ebe15b8 commit 1cd0d23

File tree

6 files changed

+13
-0
lines changed

6 files changed

+13
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,5 @@ codecov.exe
7171
.idea/*
7272
.dccache
7373
.coverage
74+
# File genrated as part of XCode tests
75+
coverage-report-test.json

src/helpers/files.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ function globBlocklist(): string[] {
150150
'test-result-*-codecoverage.json',
151151
'test_*_coverage.txt',
152152
'testrunner-coverage*',
153+
'*.*js',
153154
]
154155
}
155156

test/fixtures/coverage.cjs

Whitespace-only changes.

test/fixtures/coverage.js

Whitespace-only changes.

test/fixtures/coverage.mjs

Whitespace-only changes.

test/helpers/files.test.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,16 @@ describe('File Helpers', () => {
315315
it("ignores shell scripts by default", async () => {
316316
expect(fileHelpers.filterFilesAgainstBlockList(await getPaths(), getBlocklist())).not.toContainEqual(expect.stringMatching('codecov.sh'))
317317
})
318+
319+
it("should ignore files ending with *.*js", async () => {
320+
expect(fileHelpers.filterFilesAgainstBlockList(await getPaths(), getBlocklist())).not.toContainEqual(expect.stringMatching('coverage.cjs'))
321+
expect(fileHelpers.filterFilesAgainstBlockList(await getPaths(), getBlocklist())).not.toContainEqual(expect.stringMatching('coverage.mjs'))
322+
})
323+
324+
it("should ignore files ending with *.js", async () => {
325+
expect(fileHelpers.filterFilesAgainstBlockList(await getPaths(), getBlocklist())).not.toContainEqual(expect.stringMatching('coverage.js'))
326+
})
327+
318328
it("ignores powershell scripts by default", async () => {
319329
expect(fileHelpers.filterFilesAgainstBlockList(await getPaths(), getBlocklist())).not.toContainEqual(expect.stringMatching('codecov.ps1'))
320330
})

0 commit comments

Comments
 (0)