Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nwinch/must-jsx

Add JSX assertions to Must.js.
https://github.com/nwinch/must-jsx

Last synced: 26 days ago
JSON representation

Add JSX assertions to Must.js.

Awesome Lists containing this project

README

        

[![Build Status](https://travis-ci.org/nwinch/must-jsx.svg?branch=master)](https://travis-ci.org/nwinch/must-jsx)

# must-jsx
Add JSX assertions to Must.js.

## Install

```javascript
npm install must-jsx
```

## Usage

*Note*: If you're using `[email protected]` please use version `2.0.0` or less.

```javascript
import must from "must"
import mustJSX from "must-jsx"

mustJSX(must)

...

// Test component
class Garry extends Component {
render() {
return

Garry will {this.props.will}

}
}

describe("Component", function() {
it("must render correctly", function() {
const el =

Garry will be avenged!

// React shallow renderer
render().must.be.jsx(el)
})
})

```