mirror of https://github.com/jo/docuri.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
420 B
JavaScript
13 lines
420 B
JavaScript
var test = require('tap').test;
|
|
var docuri = require('..');
|
|
|
|
test('splat and named parameter', function(t) {
|
|
var page = docuri.route('*splat/page/:named');
|
|
|
|
t.deepEqual(page('splat/page/named'), { splat: [ 'splat' ], named: 'named' }, 'splat and named parameter parsed correctly');
|
|
t.equal(page({ splat: [ 'splat' ], named: 'named' }), 'splat/page/named', 'stringified result is in right order');
|
|
|
|
t.end();
|
|
});
|
|
|