Skip to content

nwinch/must-jsx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

must-jsx

Add JSX assertions to Must.js.

Install

npm install must-jsx

Usage

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

import must from "must"
import mustJSX from "must-jsx"

mustJSX(must)

...

// Test component
class Garry extends Component {
  render() {
    return <div>Garry will {this.props.will}</div>
  }
}

describe("Component", function() {
  it("must render correctly", function() {
    const el = <div>Garry will be avenged!</div>

    // React shallow renderer
    render(<Garry will="be avenged!" />).must.be.jsx(el)
  })
})

About

Add JSX assertions to Must.js.

Resources

Stars

Watchers

Forks

Packages

No packages published