refactor: calculate-version 由 bash 改寫為 Node.js #6

Merged
admin merged 13 commits from develop into master 2026-06-26 03:01:01 +00:00
Showing only changes of commit e54805b241 - Show all commits
+12
View File
@@ -65,6 +65,18 @@ test('fetchReleases 對非 2xx 回應拋錯', async () => {
);
});
test('fetchReleases 對無法解析的 JSON 回應拋錯', async () => {
await withFetch(
async () => jsonResponse('{ this is not valid json', true),
async () => {
await assert.rejects(
() => fetchReleases('https://gitea.example.com/api'),
/回傳資料無法解析/,
);
},
);
});
test('fetchReleases 對非陣列回應拋錯', async () => {
await withFetch(
async () => jsonResponse({ message: 'oops' }),