plastiq-router
Version:
model driven router for plastiq
11 lines (9 loc) • 342 B
JavaScript
var router = require('../..');
var expect = require('chai').expect;
describe('server routes', function () {
it('routes can be constructed and interrogated on the server', function () {
var a = router.route('/posts/:id');
expect(a.pattern).to.equal('/posts/:id');
expect(a({id: 'asdf'}).href).to.equal('/posts/asdf');
});
});