mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-14 04:12:18 +02:00
added a test to fix unbinded key
This commit is contained in:
parent
5dd9e017ea
commit
82e0934907
@ -265,4 +265,20 @@ describe('Test Keyboard', () => {
|
||||
expect(config.currentKeys[SettingInterfaceKeyboard.Button_Up].action).toEqual(Button.RIGHT);
|
||||
expect(config.currentKeys[SettingInterfaceKeyboard.Button_Up].icon).toEqual("T_D_Key_Dark.png");
|
||||
})
|
||||
|
||||
|
||||
it('Swap alt with a key not binded yet', () => {
|
||||
const settingNameA = SettingInterfaceKeyboard.Alt_Button_Up;
|
||||
|
||||
expect(config.currentKeys[SettingInterfaceKeyboard.Alt_Button_Up].key).toEqual("KEY_Z");
|
||||
expect(config.currentKeys[SettingInterfaceKeyboard.Alt_Button_Up].action).toEqual(Button.UP);
|
||||
expect(config.currentKeys[SettingInterfaceKeyboard.Alt_Button_Up].icon).toEqual("T_Z_Key_Dark.png");
|
||||
|
||||
swapCurrentKeys(config, SettingInterfaceKeyboard.Alt_Button_Up, Phaser.Input.Keyboard.KeyCodes.B);
|
||||
|
||||
expect(config.currentKeys[SettingInterfaceKeyboard.Alt_Button_Up].key).toEqual("KEY_Z");
|
||||
expect(config.currentKeys[SettingInterfaceKeyboard.Alt_Button_Up].action).toEqual(Button.UP);
|
||||
expect(config.currentKeys[SettingInterfaceKeyboard.Alt_Button_Up].icon).toEqual("T_B_Key_Dark.png");
|
||||
|
||||
})
|
||||
});
|
Loading…
Reference in New Issue
Block a user