mirror of https://github.com/jo/docuri.git
Merge pull request #12 from zerotacg/fix-mixup-of-parameters-issue-#11
mixed-up allocation of parameterspull/18/head
commit
b52bbd2c4f
@ -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