assert-that

0.0.1 • Public • Published

assert-that

JavaScript mocking library with super-simple syntax.

Syntax

const node = shallowRender(template);

assert.that(node.firstChild.isElement().hasName('div').hasId());
assert.that(node.lastChild.isComponent(MyComponent).withChild(Element));

assert.that(element.children() > 5);
assert.that(element.children(MyComponent, { label: /Choose/ }) >= 1);

assert.that(component.services() == 3);
assert.that(component.services(OtherService));

assert.that(element.children().find(MyComponent, OtherComponent, 'div'));
assert.that(element.children().filter({ class: 'some-name' }) == 2);

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.1
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.1
    1

Package Sidebar

Install

npm i assert-that

Weekly Downloads

1

Version

0.0.1

License

MIT

Last publish

Collaborators

  • aswitalski