+ \r
+ test('getting previous node', function() {\r
+ var c = new canvas.Canvas('<section><div class="some.class">Div 1</div><div class="some.other.class">Div 2</div></section>');\r
+ var secondDiv = c.getNode({tag: 'div'})[1];\r
+ var firstDiv = c.getPreviousNode({node: secondDiv});\r
+ assert.equal(firstDiv.klass, 'some-class');\r
+ })\r
+ \r
+ test('pervious node of node without "previous siblings" is its parent', function() {\r
+ var c = new canvas.Canvas('<section><div class="some.class">Div 1</div></section>');\r
+ var div = c.getNode({tag: 'div'})[0];\r
+ var section = c.getPreviousNode({node: div});\r
+ assert.equal(section.tag, 'section');\r
+ })\r