Skip to content

Latest commit

 

History

History
19 lines (15 loc) · 464 Bytes

File metadata and controls

19 lines (15 loc) · 464 Bytes

Introduction

A node package with some additional assert methods for testing the DOM

Uses xmldom and xpath.js

Install:

npm install domassert

Example:

require('domassert');
xml = '<group><item>apple</item><item>pear</item><item>orange</item></group>'
assert.hasTag(xml, "//item");
assert.hasTagWithContent(xml, "//item", "pear");