JSFiddle - React, Tailwind, and code Playground

by James Allardice

HTML

<script src="http://chaijs.com/chai.js"></script>

JavaScript

// Chai (ab?)uses getters to make `ok` a 
// property that behaves like a method when
// accessed

// JSHint doesn't like this and raises a
// warning ("Expected an assignment or
// function call and instead saw an
// expression")

// Is there any way (without simply
// ignoring the above JSHint warning all
// the time) to make JSHint happy with the
// following line?

chai.expect(1).to.be.ok;