mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 09:12:52 +00:00
26 lines
593 B
JavaScript
26 lines
593 B
JavaScript
describe('iD.ui.cmd', function () {
|
|
var detect, os;
|
|
|
|
beforeEach(function() {
|
|
detect = iD.detect;
|
|
iD.detect = function() {
|
|
return { os: os };
|
|
};
|
|
});
|
|
|
|
afterEach(function() {
|
|
iD.detect = detect;
|
|
});
|
|
|
|
it('does not overwrite mac keybindings', function () {
|
|
os = 'mac';
|
|
expect(iD.ui.cmd('⌘a')).to.eql('⌘a');
|
|
});
|
|
|
|
it('changes keys to linux versions', function () {
|
|
os = 'linux';
|
|
expect(iD.ui.cmd('⌘a')).to.eql('Ctrl+a');
|
|
expect(iD.ui.cmd('⇧a')).to.eql('Shift+a');
|
|
});
|
|
});
|