summaryrefslogtreecommitdiff
path: root/tests/steamLaunchOptions.test.ts
diff options
context:
space:
mode:
authorxXJSONDeruloXx <danielhimebauch@gmail.com>2026-09-11 16:48:35 -0400
committerxXJSONDeruloXx <danielhimebauch@gmail.com>2026-09-11 16:48:35 -0400
commit81feb03288166755545401b9df2ff2c9bc3ae7d7 (patch)
tree7fc6799626519e5b01fb137f5440c99fda5faca7 /tests/steamLaunchOptions.test.ts
parentf185d26f4d37894183cdfa8c3e6ffc718cb3b103 (diff)
downloaddecky-lsfg-vk-81feb03288166755545401b9df2ff2c9bc3ae7d7.tar.gz
decky-lsfg-vk-81feb03288166755545401b9df2ff2c9bc3ae7d7.zip
handle flatpak grey, id proton and exclusionschore/migrate
Diffstat (limited to 'tests/steamLaunchOptions.test.ts')
-rw-r--r--tests/steamLaunchOptions.test.ts20
1 files changed, 17 insertions, 3 deletions
diff --git a/tests/steamLaunchOptions.test.ts b/tests/steamLaunchOptions.test.ts
index 40aeb3c..1d2f762 100644
--- a/tests/steamLaunchOptions.test.ts
+++ b/tests/steamLaunchOptions.test.ts
@@ -28,7 +28,7 @@ test("inserts one wrapper immediately before an existing command macro", () => {
});
});
-test("normalizes blank and argument-only shortcut fields", () => {
+test("normalizes blank, malformed, and argument-only launch fields", () => {
assert.deepEqual(installWrapperLaunchOption("", wrapper), {
options: `${wrapper} %command%`,
commandTokenAdded: true,
@@ -37,8 +37,22 @@ test("normalizes blank and argument-only shortcut fields", () => {
options: `FOO=bar ${wrapper} %command% --windowed`,
commandTokenAdded: true,
});
- assert.throws(() => installWrapperLaunchOption("gamemoderun --windowed", wrapper), /refusing to guess/);
- assert.throws(() => installWrapperLaunchOption('"%command%"', wrapper), /refusing to guess/);
+ assert.deepEqual(installWrapperLaunchOption("gamemoderun --windowed", wrapper), {
+ options: `${wrapper} %command% gamemoderun --windowed`,
+ commandTokenAdded: true,
+ });
+ assert.deepEqual(installWrapperLaunchOption('"%command%"', wrapper), {
+ options: `${wrapper} %command%`,
+ commandTokenAdded: false,
+ });
+ assert.deepEqual(installWrapperLaunchOption(`${wrapper} %command`, wrapper), {
+ options: `${wrapper} %command%`,
+ commandTokenAdded: false,
+ });
+ assert.deepEqual(installWrapperLaunchOption(`${wrapper} --windowed`, wrapper), {
+ options: `${wrapper} %command% --windowed`,
+ commandTokenAdded: true,
+ });
});
test("preserves assignments quoting suffixes and released wrapper cleanup", () => {