Files
buuh/test.js
T

18 lines
395 B
JavaScript
Raw Normal View History

2017-05-24 13:02:33 +02:00
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')
2017-05-24 13:02:33 +02:00
t.end()
})