Files
iD/test/spec/ui/cmd.js
Tom MacWright 7e9a427a2b Test getPrototype, use American spellings, fix test formatting.
* Stub Lasso test
* Add cmd test
2013-03-05 17:59:50 -05:00

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');
});
});