Skip to content

Commit

Permalink
restore xml-assert
Browse files Browse the repository at this point in the history
  • Loading branch information
Yaron Naveh committed Dec 15, 2012
1 parent 87c26f8 commit 6f08e97
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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/)",
Expand Down
11 changes: 11 additions & 0 deletions test/xml-assert.js
Original file line number Diff line number Diff line change
@@ -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.