--- /dev/null
+define([
+ 'libs/jquery'
+], function($) {
+
+'use strict';
+
+
+var Document = function(xml) {
+ var $document = $(xml);
+
+
+ Object.defineProperty(this, 'root', {get: function() { return new ElementNode($document[0])}});
+}
+
+
+var ElementNode = function(nativeNode) {
+ var myNode = nativeNode,
+ $myNode = $(nativeNode);
+
+
+ this.getTagName = function() {
+ return myNode.tagName.toLowerCase();
+ }
+};
+
+return {
+ fromXML: function(xml) {
+ return new Document(xml);
+ }
+};
+
+});
\ No newline at end of file
--- /dev/null
+define([
+ 'libs/chai',
+ './smartxml.js'
+], function(chai, smartxml) {
+
+'use strict';
+
+
+var expect = chai.expect;
+
+
+describe.only('Basic use', function() {
+ it('exposes root element', function() {
+ var doc = smartxml.fromXML('<div></div>');
+ expect(doc.root.getTagName()).to.equal('div');
+ });
+});
+
+});
\ No newline at end of file