Files
buuh/test.js
T
Yoshua Wuyts 8ff7deea3c add server tests (#501)
* add server tests

* remove node 4 tests
2017-05-24 13:02:33 +02:00

18 lines
388 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(), exp, 'result was OK')
t.end()
})