diff --git a/tests/wiring.test.mjs b/tests/wiring.test.mjs index 52217dd..a53b0fe 100644 --- a/tests/wiring.test.mjs +++ b/tests/wiring.test.mjs @@ -143,3 +143,14 @@ test('uploaded top HUD uses its new aspect ratio', async () => { assert.match(source, /\.steam-top \{[\s\S]*?aspect-ratio: 960 \/ 246/); assert.match(source, /@media \(min-width: 700px\)[\s\S]*?\.steam-top \{[\s\S]*?aspect-ratio: 960 \/ 246/); }); + + +test('game consumes analog helm vector and keeps broadside cooldowns independent', async () => { + const source = await read('src/game-v4.js'); + + assert.match(source, /addEventListener\('airship:helm-vector', this\.handleHelmVector\)/); + assert.match(source, /const throttleForward = this\.cursors\.up\.isDown \? 1 : Math\.max\(0, -helmY\)/); + assert.match(source, /const turnInput = keyboardTurn \|\| helmX/); + assert.match(source, /const broadside = side < 0 \? 'port' : 'starboard'/); + assert.match(source, /this\.lastPlayerShot\[broadside\]/); +});