JSFiddle - React, Tailwind, and code Playground

by rosenfeld

HTML

<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <title>strftime</title>
  </head>
  <body>
    <script type="text/javascript" src="http://busterjs.org/releases/latest/buster-test.js"></script>
  </body>
</html>

CoffeeScript

buster.spec.expose()

$ -> describe 'something', ->
  beforeAll -> console.log 'before all'
  before -> console.log 'before'
  afterAll -> console.log 'after all'
  after -> console.log 'after'
  it 'works', ->
    console.log 'works'
    expect(true).toBe true
  it 'fails', ->
    console.log 'fails'
    expect(true).toBe false
  it 'no assertions', -> console.log 'no assertions'
  it '//pending', -> console.log 'pending'
  it 'fails on sync specs when done is not called', (done)-> expect(true).toBe true
  it 'works on sync specs when done is called', (done)-> expect(true).toBe true; done()
  it 'also works with assertions', -> assert.equals 1, 1
  
console.log n for n of expect(1)