JSFiddle - React, Tailwind, and code Playground

by rich_harris

HTML

<script src="http://code.jquery.com/qunit/qunit-1.14.0.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/qunit/qunit-1.14.0.css">
<div id="qunit"></div>
<div id="qunit-fixture"></div>

JavaScript

var fixture = document.getElementById( 'qunit-fixture' );

test( 'We are ready to write some tests', function ( t ) {
    var ractive = new Ractive({
        el: fixture,
        template: 'hello {{name}}!',
        data: { name: 'world' }
    });
                              
    t.equal( fixture.innerHTML, 'hello world!' );
    t.deepEqual( ractive.get(), { name: 'world' });
});