nebius/SWE-rebench-V2-PRs huggingface dataset:
Repository: codecov/uploader
Pull request #798 (2022-06-10 12:58:37)

feat: ignore files ending in .*js

vlad-ko: Looks good 

Patch:
diff --git a/.gitignore b/.gitignore
index 9fc97b5..1c2ae19 100644
--- a/.gitignore
+++ b/.gitignore
@@ -71,3 +71,5 @@ codecov.exe
 .idea/*
 .dccache
 .coverage
+# File genrated as part of XCode tests
+coverage-report-test.json
diff --git a/src/helpers/files.ts b/src/helpers/files.ts
index b3084f3..c7541ec 100644
--- a/src/helpers/files.ts
+++ b/src/helpers/files.ts
@@ -150,6 +150,7 @@ function globBlocklist(): string[] {
     'test-result-*-codecoverage.json',
     'test_*_coverage.txt',
     'testrunner-coverage*',
+    '*.*js',
   ]
 }
 


Test patch:
diff --git a/test/fixtures/coverage.cjs b/test/fixtures/coverage.cjs
new file mode 100644
index 0000000..e69de29
diff --git a/test/fixtures/coverage.js b/test/fixtures/coverage.js
new file mode 100644
index 0000000..e69de29
diff --git a/test/fixtures/coverage.mjs b/test/fixtures/coverage.mjs
new file mode 100644
index 0000000..e69de29
diff --git a/test/helpers/files.test.ts b/test/helpers/files.test.ts
index e59c88d..211c991 100644
--- a/test/helpers/files.test.ts
+++ b/test/helpers/files.test.ts
@@ -315,6 +315,16 @@ describe('File Helpers', () => {
     it("ignores shell scripts by default", async () => {
       expect(fileHelpers.filterFilesAgainstBlockList(await getPaths(), getBlocklist())).not.toContainEqual(expect.stringMatching('codecov.sh'))
     })
+
+    it("should ignore files ending with *.*js", async () => {
+      expect(fileHelpers.filterFilesAgainstBlockList(await getPaths(), getBlocklist())).not.toContainEqual(expect.stringMatching('coverage.cjs'))
+      expect(fileHelpers.filterFilesAgainstBlockList(await getPaths(), getBlocklist())).not.toContainEqual(expect.stringMatching('coverage.mjs'))
+    })
+
+    it("should ignore files ending with *.js", async () => {
+      expect(fileHelpers.filterFilesAgainstBlockList(await getPaths(), getBlocklist())).not.toContainEqual(expect.stringMatching('coverage.js'))
+    })
+
     it("ignores powershell scripts by default", async () => {
       expect(fileHelpers.filterFilesAgainstBlockList(await getPaths(), getBlocklist())).not.toContainEqual(expect.stringMatching('codecov.ps1'))
     })