simpler assertions after moving transformations into object namespace
authorAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Fri, 6 Dec 2013 09:10:50 +0000 (10:10 +0100)
committerAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Sun, 15 Dec 2013 21:32:48 +0000 (22:32 +0100)
src/smartxml/smartxml.test.js

index bfe06ad..41742d9 100644 (file)
@@ -836,15 +836,9 @@ describe('smartxml', function() {
             textNode = doc.root.contents()[0];
             extension = {};
             
-            expect(function() {
-                elementNode.testTransformation();
-            }).to.throw(Error);
-            expect(function() {
-                textNode.testTransformation();
-            }).to.throw(Error);
-            expect(function() {
-                doc.testTransformation();
-            }).to.throw(Error);
+            expect(elementNode.testTransformation).to.be.undefined;
+            expect(textNode.testTransformation).to.be.undefined;
+            expect(doc.testTransformation).to.be.undefined;
             
             expect(doc.testMethod).to.be.undefined;
             expect(elementNode.testMethod).to.be.undefined;