Spaces:
Paused
Paused
icebear0828 commited on
Commit ·
28a98b1
1
Parent(s): 43308ae
fix: exclude test files from tsc build to unbreak Docker CI
Browse filestsconfig included src/**/__tests__/** and *.test.ts, so `npx tsc` in
Dockerfile compiled test files. When test fixtures drifted from changed
interfaces (e.g. CurlFetchResponse gaining/losing fields), Docker build
failed even though Vitest passed. Exclude test globs from the build
tsconfig and fix the stale `headers` property in update-checker mocks.
- src/__tests__/update-checker.test.ts +0 -3
- tsconfig.json +1 -1
src/__tests__/update-checker.test.ts
CHANGED
|
@@ -68,7 +68,6 @@ describe("update-checker writes to data/, not config/", () => {
|
|
| 68 |
ok: true,
|
| 69 |
status: 200,
|
| 70 |
body: APPCAST_XML,
|
| 71 |
-
headers: {},
|
| 72 |
});
|
| 73 |
|
| 74 |
// Dynamic import to get fresh module state
|
|
@@ -97,7 +96,6 @@ describe("update-checker writes to data/, not config/", () => {
|
|
| 97 |
ok: true,
|
| 98 |
status: 200,
|
| 99 |
body: APPCAST_XML,
|
| 100 |
-
headers: {},
|
| 101 |
});
|
| 102 |
|
| 103 |
const { checkForUpdate } = await import("../update-checker.js");
|
|
@@ -115,7 +113,6 @@ describe("update-checker writes to data/, not config/", () => {
|
|
| 115 |
ok: true,
|
| 116 |
status: 200,
|
| 117 |
body: APPCAST_XML,
|
| 118 |
-
headers: {},
|
| 119 |
});
|
| 120 |
|
| 121 |
const { checkForUpdate } = await import("../update-checker.js");
|
|
|
|
| 68 |
ok: true,
|
| 69 |
status: 200,
|
| 70 |
body: APPCAST_XML,
|
|
|
|
| 71 |
});
|
| 72 |
|
| 73 |
// Dynamic import to get fresh module state
|
|
|
|
| 96 |
ok: true,
|
| 97 |
status: 200,
|
| 98 |
body: APPCAST_XML,
|
|
|
|
| 99 |
});
|
| 100 |
|
| 101 |
const { checkForUpdate } = await import("../update-checker.js");
|
|
|
|
| 113 |
ok: true,
|
| 114 |
status: 200,
|
| 115 |
body: APPCAST_XML,
|
|
|
|
| 116 |
});
|
| 117 |
|
| 118 |
const { checkForUpdate } = await import("../update-checker.js");
|
tsconfig.json
CHANGED
|
@@ -15,5 +15,5 @@
|
|
| 15 |
"isolatedModules": true
|
| 16 |
},
|
| 17 |
"include": ["src/**/*.ts"],
|
| 18 |
-
"exclude": ["node_modules", "dist"]
|
| 19 |
}
|
|
|
|
| 15 |
"isolatedModules": true
|
| 16 |
},
|
| 17 |
"include": ["src/**/*.ts"],
|
| 18 |
+
"exclude": ["node_modules", "dist", "src/**/__tests__/**", "src/**/*.test.ts"]
|
| 19 |
}
|