Files
buuh/test.js
T
Johan Bergström b157fba413 test: trim whitespace before matching (#532)
Avoid testing whitespace in strictEquals.
2017-07-20 17:40:53 +02:00

18 lines
395 B
JavaScript

var tape = require('tape')
var html = require('./html')
var choo = require('./')
tape('should render on the server', function (t) {
var app = choo()
app.route('/', function (state, emit) {
return html`
<p>Hello filthy planet</p>
`
})
var res = app.toString('/')
var exp = '<p>Hello filthy planet</p>'
t.equal(res.toString().trim(), exp, 'result was OK')
t.end()
})