mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-04-10 16:19:24 -07:00
[codex] Replace mpv fullscreen toggle with launch mode config (#48)
Co-authored-by: bee <autumn@skerritt.blog>
This commit is contained in:
@@ -13,6 +13,17 @@ test('resolveConfig trims configured mpv executable path', () => {
|
||||
assert.deepEqual(warnings, []);
|
||||
});
|
||||
|
||||
test('resolveConfig parses configured mpv launch mode', () => {
|
||||
const { resolved, warnings } = resolveConfig({
|
||||
mpv: {
|
||||
launchMode: 'maximized',
|
||||
},
|
||||
});
|
||||
|
||||
assert.equal(resolved.mpv.launchMode, 'maximized');
|
||||
assert.deepEqual(warnings, []);
|
||||
});
|
||||
|
||||
test('resolveConfig warns for invalid mpv executable path type', () => {
|
||||
const { resolved, warnings } = resolveConfig({
|
||||
mpv: {
|
||||
@@ -29,3 +40,20 @@ test('resolveConfig warns for invalid mpv executable path type', () => {
|
||||
message: 'Expected string.',
|
||||
});
|
||||
});
|
||||
|
||||
test('resolveConfig warns for invalid mpv launch mode', () => {
|
||||
const { resolved, warnings } = resolveConfig({
|
||||
mpv: {
|
||||
launchMode: 'cinema' as never,
|
||||
},
|
||||
});
|
||||
|
||||
assert.equal(resolved.mpv.launchMode, 'normal');
|
||||
assert.equal(warnings.length, 1);
|
||||
assert.deepEqual(warnings[0], {
|
||||
path: 'mpv.launchMode',
|
||||
value: 'cinema',
|
||||
fallback: 'normal',
|
||||
message: "Expected one of: 'normal', 'maximized', 'fullscreen'.",
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user