fnp
/
fnpeditor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
linting, cleanup, removing unused code
[fnpeditor.git]
/
src
/
smartxml
/
smartxml.test.js
diff --git
a/src/smartxml/smartxml.test.js
b/src/smartxml/smartxml.test.js
index
0bf5dd5
..
4049dff
100644
(file)
--- a/
src/smartxml/smartxml.test.js
+++ b/
src/smartxml/smartxml.test.js
@@
-1,8
+1,9
@@
define([
'libs/chai',
'libs/sinon',
define([
'libs/chai',
'libs/sinon',
+ 'libs/underscore',
'./smartxml.js'
'./smartxml.js'
-], function(chai, sinon, smartxml) {
+], function(chai, sinon,
_,
smartxml) {
'use strict';
/*jshint expr:true */
'use strict';
/*jshint expr:true */
@@
-939,7
+940,7
@@
describe('smartxml', function() {
expect(elementNode.textTestTransformation).to.be.undefined;
expect(textNode.textTestTransformation().sameNode(textNode)).to.be.true;
expect(elementNode.textTestTransformation).to.be.undefined;
expect(textNode.textTestTransformation().sameNode(textNode)).to.be.true;
- expect(textNode.elementTestTransfomation).to.be.undefined;
+ expect(textNode.elementTestTransfomation).to.be.undefined;
});
it('allows text/element node methods and transformations to access node and transormations on document node', function() {
});
it('allows text/element node methods and transformations to access node and transormations on document node', function() {
@@
-998,8
+999,7
@@
describe('smartxml', function() {
it('smoke tests', function() {
var doc = getDocumentFromXML('<div>Alice</div>'),
it('smoke tests', function() {
var doc = getDocumentFromXML('<div>Alice</div>'),
- textNode = doc.root.contents()[0],
- result;
+ textNode = doc.root.contents()[0];
expect(doc.undoStack).to.have.length(0);
expect(doc.undoStack).to.have.length(0);
@@
-1011,7
+1011,6
@@
describe('smartxml', function() {
expect(doc.undoStack).to.have.length(0, '2');
expect(doc.toXML()).to.equal('<div>Alice</div>');
expect(doc.undoStack).to.have.length(0, '2');
expect(doc.toXML()).to.equal('<div>Alice</div>');
- debugger;
doc.redo();
expect(doc.undoStack).to.have.length(1, '3');
expect(doc.toXML()).to.equal('<div>A<span>l</span>ice</div>');
doc.redo();
expect(doc.undoStack).to.have.length(1, '3');
expect(doc.toXML()).to.equal('<div>A<span>l</span>ice</div>');
@@
-1028,10
+1027,8
@@
describe('smartxml', function() {
it('smoke tests 2', function() {
var doc = getDocumentFromXML('<div>Alice</div>'),
textNode = doc.root.contents()[0],
it('smoke tests 2', function() {
var doc = getDocumentFromXML('<div>Alice</div>'),
textNode = doc.root.contents()[0],
- path = textNode.getPath(),
- result;
+ path = textNode.getPath();
- debugger;
textNode.setText('Alice ');
textNode.setText('Alice h');
textNode.setText('Alice ha');
textNode.setText('Alice ');
textNode.setText('Alice h');
textNode.setText('Alice ha');
@@
-1147,7
+1144,7
@@
describe('smartxml', function() {
expect(doc.root.contents()[0].getAttr('x')).to.equal('10', 'empty redoStack so redo was noop');
doc.undo();
expect(doc.root.contents()[0].getAttr('x')).to.equal('4', 'undoing additional transformation');
expect(doc.root.contents()[0].getAttr('x')).to.equal('10', 'empty redoStack so redo was noop');
doc.undo();
expect(doc.root.contents()[0].getAttr('x')).to.equal('4', 'undoing additional transformation');
- doc.redo()
+ doc.redo()
;
expect(doc.root.contents()[0].getAttr('x')).to.equal('10', 'redoing additional transformation');
});
});
expect(doc.root.contents()[0].getAttr('x')).to.equal('10', 'redoing additional transformation');
});
});