mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-05-27 12:55:20 -07:00
feat(macos): configuration window + curl-backed macOS updater (#71)
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import test from 'node:test';
|
||||
import assert from 'node:assert/strict';
|
||||
import { parseOptionalNumberInputValue } from './input-values';
|
||||
|
||||
test('parseOptionalNumberInputValue treats empty input as unset', () => {
|
||||
assert.deepEqual(parseOptionalNumberInputValue(''), { ok: true, value: undefined });
|
||||
assert.deepEqual(parseOptionalNumberInputValue(' '), { ok: true, value: undefined });
|
||||
});
|
||||
|
||||
test('parseOptionalNumberInputValue parses finite numeric input', () => {
|
||||
assert.deepEqual(parseOptionalNumberInputValue('42'), { ok: true, value: 42 });
|
||||
assert.deepEqual(parseOptionalNumberInputValue(' 3.5 '), { ok: true, value: 3.5 });
|
||||
});
|
||||
|
||||
test('parseOptionalNumberInputValue rejects invalid numeric input', () => {
|
||||
assert.deepEqual(parseOptionalNumberInputValue('abc'), { ok: false });
|
||||
});
|
||||
Reference in New Issue
Block a user