Skip to content

Commit

Permalink
lint: Fix linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderGugel committed Jul 8, 2015
1 parent 4681a47 commit 7f47a0b
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 64 deletions.
4 changes: 2 additions & 2 deletions dom-renderables/DOMElement.js
Original file line number Diff line number Diff line change
Expand Up @@ -327,8 +327,8 @@ DOMElement.prototype.onTransformChange = function onTransformChange (transform)
*
* @method
*
* @param {Number} x width of the Node the DOMElement is attached to
* @param {Number} y height of the Node the DOMElement is attached to
* @param {Number} width width of the Node the DOMElement is attached to
* @param {Number} height height of the Node the DOMElement is attached to
*
* @return {DOMElement} this
*/
Expand Down
125 changes: 63 additions & 62 deletions dom-renderables/test/DOMElement.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,69 +25,70 @@
'use strict';

var test = require('tape');
var DOMElement = require('../DOMElement');


var IDENT = [
1, 0, 0, 0,
0, 1, 0, 0,
0, 0, 1, 0,
0, 0, 0, 1
];

function createMockNode() {
return {
sentDrawCommands: [],
sendDrawCommand: function(command) {
this.sentDrawCommands.push(command);
},
shown: true,
isShown: function() {
return this.shown;
},
addedComponent: false,
addComponent: function() {
this.addedComponent = true;
},
location: 'body/0',
getLocation: function() {
return this.location;
},
transform: IDENT,
getTransform: function() {
return this.transform;
},
requestedUpdate: false,
requestUpdate: function() {
this.requestedUpdate = true;
},
size: [0, 0, 0],
getSize: function() {
return this.size;
},
sizeMode: [0, 0, 0],
getSizeMode: function() {
return this.sizeMode;
},
uiEvents: [],
getUIEvents: function() {
return this.uiEvents;
},
opacity: 1,
getOpacity: function() {
return this.opacity;
}
};
}

function createMountedDOMElement() {
var node = createMockNode();
var domElement = new DOMElement(node);
domElement.onMount(node, 0);
domElement.onUpdate();
node.sentDrawCommands.length = 0;
return domElement;
}
// var DOMElement = require('../DOMElement');
//
//
// var IDENT = [
// 1, 0, 0, 0,
// 0, 1, 0, 0,
// 0, 0, 1, 0,
// 0, 0, 0, 1
// ];
//
// function createMockNode() {
// return {
// sentDrawCommands: [],
// sendDrawCommand: function(command) {
// this.sentDrawCommands.push(command);
// },
// shown: true,
// isShown: function() {
// return this.shown;
// },
// addedComponent: false,
// addComponent: function() {
// this.addedComponent = true;
// },
// location: 'body/0',
// getLocation: function() {
// return this.location;
// },
// transform: IDENT,
// getTransform: function() {
// return this.transform;
// },
// requestedUpdate: false,
// requestUpdate: function() {
// this.requestedUpdate = true;
// },
// size: [0, 0, 0],
// getSize: function() {
// return this.size;
// },
// sizeMode: [0, 0, 0],
// getSizeMode: function() {
// return this.sizeMode;
// },
// uiEvents: [],
// getUIEvents: function() {
// return this.uiEvents;
// },
// opacity: 1,
// getOpacity: function() {
// return this.opacity;
// }
// };
// }
//
// function createMountedDOMElement() {
// var node = createMockNode();
// var domElement = new DOMElement(node);
// domElement.onMount(node, 0);
// domElement.onUpdate();
// node.sentDrawCommands.length = 0;
// return domElement;
// }

test('DOMElement', function(t) {
// t.test('constructor', function(t) {
Expand Down

0 comments on commit 7f47a0b

Please sign in to comment.