mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-11-10 04:46:07 -08:00
fix: rename Windows ZIPs and fix macOS manual update checks (#81)
This commit is contained in:
1 parent
10463e7348
commit
17d97f0b7e
11 files changed
+133
-8
No files matched your search
@@ -2,7 +2,7 @@ import assert from 'node:assert/strict';
|
||||
import test from 'node:test';
|
||||
import { shouldFetchReleaseMetadataForPlatform } from './release-metadata-policy';
|
||||
|
||||
test('macOS release metadata fetch is skipped only when native updater is unsupported', () => {
|
||||
test('macOS automatic release metadata fetch is skipped when native updater is unsupported', () => {
|
||||
assert.equal(
|
||||
shouldFetchReleaseMetadataForPlatform('darwin', {
|
||||
available: false,
|
||||
@@ -28,6 +28,33 @@ test('macOS release metadata fetch is skipped only when native updater is unsupp
|
||||
);
|
||||
});
|
||||
|
||||
test('macOS manual checks fetch release metadata when native updater is unsupported', () => {
|
||||
const unsupportedUpdate = {
|
||||
available: false,
|
||||
version: '0.15.0-beta.4',
|
||||
canUpdate: false,
|
||||
};
|
||||
|
||||
assert.equal(
|
||||
shouldFetchReleaseMetadataForPlatform('darwin', unsupportedUpdate, {
|
||||
source: 'manual',
|
||||
}),
|
||||
true,
|
||||
);
|
||||
assert.equal(
|
||||
shouldFetchReleaseMetadataForPlatform('darwin', unsupportedUpdate, {
|
||||
source: 'launcher',
|
||||
}),
|
||||
true,
|
||||
);
|
||||
assert.equal(
|
||||
shouldFetchReleaseMetadataForPlatform('darwin', unsupportedUpdate, {
|
||||
source: 'automatic',
|
||||
}),
|
||||
false,
|
||||
);
|
||||
});
|
||||
|
||||
test('non-macOS release metadata fetch is not gated by native updater support', () => {
|
||||
assert.equal(
|
||||
shouldFetchReleaseMetadataForPlatform('linux', {
|
||||
|
||||
Reference in new issue
Block a user