mirror of https://github.com/jo/docuri.git
parent
bc9dff9d4c
commit
3fa59e012a
@ -0,0 +1,12 @@
|
||||
var test = require('tap').test;
|
||||
var docuri = require('..');
|
||||
|
||||
test('splat and named parameter', function(t) {
|
||||
docuri.route('*splat/page/:named', 'page');
|
||||
|
||||
t.deepEqual(docuri.page('splat/page/named'), { splat: [ 'splat' ], named: 'named' }, 'splat and named parameter parsed correctly');
|
||||
t.equal(docuri.page({ splat: [ 'splat' ], named: 'named' }), 'splat/page/named', 'stringified result is in right order');
|
||||
|
||||
t.end();
|
||||
});
|
||||
|
Loading…
Reference in New Issue