Skip to content

Commit

Permalink
style: drop spaces at end of file
Browse files Browse the repository at this point in the history
  • Loading branch information
nikku committed Oct 14, 2024
1 parent 4b49b99 commit 27a6d4a
Showing 1 changed file with 30 additions and 30 deletions.
60 changes: 30 additions & 30 deletions test/spec/navigation/keyboard-move/KeyboardMoveSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ describe('navigation/keyboard-move', function() {


describe('with Cmd/Ctrl', function() {

describe('with default config', function() {

it('should not move when neither Ctrl nor Cmd is pressed down',
Expand All @@ -81,12 +81,12 @@ describe('navigation/keyboard-move', function() {


describe('with custom config', function() {

var BASE_SPEED = 50,
HIGH_SPEED = 200;

describe('without shift', function() {

var decisionTable = [
{
desc: 'move left',
Expand All @@ -113,52 +113,52 @@ describe('navigation/keyboard-move', function() {
y: BASE_SPEED
}
];

forEach(decisionTable, function(testCase) {

forEach(testCase.keys, function(key) {

it('should ' + testCase.desc + ' with CtrlKey', inject(function(canvas, keyboard) {

// given
var event = createKeyEvent(key, {
ctrlKey: true,
shiftKey: false
});

// when
keyboard._keyHandler(event);

// then
expect(canvas.viewbox().x).to.eql(testCase.x);
expect(canvas.viewbox().y).to.eql(testCase.y);
}));


it('should ' + testCase.desc + ' with CmdKey', inject(function(canvas, keyboard) {

// given
var event = createKeyEvent(key, {
metaKey: true,
shiftKey: false
});

// when
keyboard._keyHandler(event);

// then
expect(canvas.viewbox().x).to.eql(testCase.x);
expect(canvas.viewbox().y).to.eql(testCase.y);
}));

});

});

});

describe('with shift', function() {

var decisionTable = [
{
desc: 'move left',
Expand All @@ -185,30 +185,30 @@ describe('navigation/keyboard-move', function() {
y: HIGH_SPEED
},
];

forEach(decisionTable, function(testCase) {

forEach(testCase.keys, function(key) {

it('should ' + testCase.desc, inject(function(canvas, keyboard) {

// given
var event = createKeyEvent(key, { ctrlKey: true, shiftKey: true });

// when
keyboard._keyHandler(event);

// then
expect(canvas.viewbox().x).to.eql(testCase.x);
expect(canvas.viewbox().y).to.eql(testCase.y);
}));

});

});

});

});

});
Expand Down

0 comments on commit 27a6d4a

Please sign in to comment.