Skip to content

Commit bccc530

Browse files
committed
add method regression tests
1 parent 1c8ccc8 commit bccc530

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

test.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,19 @@ tape('should render on the server with hyperscript', function (t) {
2929
t.equal(res.toString().trim(), exp, 'result was OK')
3030
t.end()
3131
})
32+
33+
tape('should expose a public API', function (t) {
34+
var app = choo()
35+
36+
t.equal(typeof app.route, 'function', 'app.route prototype method exists')
37+
t.equal(typeof app.toString, 'function', 'app.toString prototype method exists')
38+
t.equal(typeof app.start, 'function', 'app.start prototype method exists')
39+
t.equal(typeof app.mount, 'function', 'app.mount prototype method exists')
40+
t.equal(typeof app.emitter, 'object', 'app.emitter prototype method exists')
41+
42+
t.equal(typeof app.emit, 'function', 'app.emit instance method exists')
43+
t.equal(typeof app.router, 'object', 'app.router instance object exists')
44+
t.equal(typeof app.state, 'object', 'app.state instance object exists')
45+
46+
t.end()
47+
})

0 commit comments

Comments
 (0)