node package manager
Painless code sharing. npm Orgs help your team discover, share, and reuse code. Create a free org »


QUnit Nodes assertion plugin

Build Status NPM version

The plugin provides a convenient API for batch acceptance assertions


assert.nodes( batch );

Where batch is an array of assertion request objects, each of the following structure:

    node: node /* node reference */,
    assert: "exists" /*  one of exists, visible, hidden, checked */,
    message: "success" /* Assertion result message */


test( "Components availability", function( assert ) {
        {node: $("section.example"),
            assert: "exists",
            message: "Body contains section.example"
        {node: $("#save-btn"),
            assert: "visible",
            message: "Save button is visible"
        {node: $("#save-as-xml"),
            assert: "checked",
            message: "'Save as XML' option is checked"

For more examples, refer to the unit tests. alpha