mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-23 08:39:56 +02:00
Use context.keybinding for keybindings that don't change
(closes #5487)
This commit is contained in:
@@ -9,7 +9,7 @@ describe('utilKeybinding', function() {
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
keybinding.off(d3.select(document));
|
||||
d3.select(document).call(keybinding.unbind);
|
||||
input.remove();
|
||||
});
|
||||
|
||||
@@ -86,13 +86,13 @@ describe('utilKeybinding', function() {
|
||||
expect(spy).to.have.been.calledOnce;
|
||||
});
|
||||
|
||||
it('resets bindings when keybinding.off is called', function () {
|
||||
it('resets bindings when keybinding.unbind is called', function () {
|
||||
d3.select(document).call(keybinding.on('A', spy));
|
||||
happen.keydown(document, {keyCode: 65});
|
||||
expect(spy).to.have.been.calledOnce;
|
||||
|
||||
spy = sinon.spy();
|
||||
d3.select(document).call(keybinding.off);
|
||||
d3.select(document).call(keybinding.unbind);
|
||||
d3.select(document).call(keybinding.on('A', spy));
|
||||
happen.keydown(document, {keyCode: 65});
|
||||
expect(spy).to.have.been.calledOnce;
|
||||
|
||||
Reference in New Issue
Block a user