From 472cd053aab1432d19f9deebb6141567bbe91ff6 Mon Sep 17 00:00:00 2001
From: Michael Williamson
Date: Tue, 8 Jul 2014 10:25:57 +0100
Subject: Use jshint and fix errors
---
tests/xmlreader.tests.js | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
(limited to 'tests/xmlreader.tests.js')
diff --git a/tests/xmlreader.tests.js b/tests/xmlreader.tests.js
index aec0229..842e300 100644
--- a/tests/xmlreader.tests.js
+++ b/tests/xmlreader.tests.js
@@ -9,25 +9,25 @@ describe('xmlreader.read', function() {
return xmlreader.read("").then(function(result) {
assert.deepEqual({type: "element", name: "body", attributes: {}, children: []}, result.root);
});
- })
+ });
test('should read empty element with separate closing tag', function() {
return xmlreader.read("
").then(function(result) {
assert.deepEqual({type: "element", name: "body", attributes: {}, children: []}, result.root);
});
- })
+ });
test('should read attributes of tags', function() {
return xmlreader.read('Hello!').then(function(result) {
assert.deepEqual({type: "text", value: "Hello!"}, result.root.children[0]);
});
- })
+ });
test('should read element with children', function() {
return xmlreader.read("").then(function(result) {
@@ -36,13 +36,13 @@ describe('xmlreader.read', function() {
assert.equal("a", root.children[0].name);
assert.equal("b", root.children[1].name);
});
- })
+ });
test('unmapped namespaces URIs are included in braces as prefix', function() {
return xmlreader.read('').then(function(result) {
assert.deepEqual(result.root.name, "{word}:body");
});
- })
+ });
test('mapped namespaces URIs are translated using map', function() {
var namespaceMap = {
@@ -52,7 +52,7 @@ describe('xmlreader.read', function() {
return xmlreader.read('', namespaceMap).then(function(result) {
assert.deepEqual(result.root.name, "x:body");
});
- })
+ });
test('namespace of attributes is mapped to prefix', function() {
var namespaceMap = {
@@ -62,20 +62,20 @@ describe('xmlreader.read', function() {
return xmlreader.read(xmlString, namespaceMap).then(function(result) {
assert.deepEqual(result.root.attributes["x:val"], "Hello!");
});
- })
+ });
test('can find first element with name', function() {
return xmlreader.read('').then(function(result) {
var first = result.root.first("b");
assert.equal("1", first.attributes.index);
});
- })
+ });
test('whitespace between xml declaration and root tag is ignored', function() {
return xmlreader.read('\n