Skip to content
Browse files

restore xml-assert

  • Loading branch information...
1 parent 87c26f8 commit 6f08e97e8b3143f26bfd390d7b3d6601db2a312b Yaron Naveh committed Dec 16, 2012
Showing with 12 additions and 1 deletion.
  1. +1 −1 package.json
  2. +11 −0 test/xml-assert.js
View
2 package.json
@@ -1,6 +1,6 @@
{
"name": "xml-crypto",
- "version": "0.0.8",
+ "version": "0.0.9",
"description": "Xml digital signature and encryption library for Node.js",
"engines": { "node": ">=0.4.0" },
"author": "Yaron Naveh (yaronn01@gmail.com, http://webservices20.blogspot.com/)",
View
11 test/xml-assert.js
@@ -0,0 +1,11 @@
+var select = require('../lib/xpath.js').SelectNodes
+ , dom = require('xmldom').DOMParser
+
+
+function nodeExists(test, doc, xpath) {
+ if (!doc && !xpath) return
+ var node = select(doc, xpath)
+ test.ok(node.length==1, "xpath " + xpath + " not found")
+}
+
+exports.nodeExists = nodeExists

0 comments on commit 6f08e97

Please sign in to comment.
Something went wrong with that request. Please try again.