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.
27 lines
536 B
JavaScript
27 lines
536 B
JavaScript
var test = require('tap').test;
|
|
var docuri = require('..');
|
|
|
|
test('reserved name route', function(t) {
|
|
t.plan(1);
|
|
|
|
try {
|
|
docuri.route('page', 'route');
|
|
} catch(e) {
|
|
t.equal(e, 'Reserved name "route" cannot be used.', 'reserved name "route" should throw error');
|
|
}
|
|
|
|
t.end();
|
|
});
|
|
|
|
test('reserved name routes', function(t) {
|
|
t.plan(1);
|
|
|
|
try {
|
|
docuri.route('page', 'routes');
|
|
} catch(e) {
|
|
t.equal(e, 'Reserved name "routes" cannot be used.', 'reserved name "routes" should throw error');
|
|
}
|
|
|
|
t.end();
|
|
});
|