Skip to content

Commit e06b92f

Browse files
committed
save
1 parent adb9534 commit e06b92f

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

tests/tiny.js

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ tape('tiny::usage::sub-apps', async (t) => {
515515

516516
const app = tiny()
517517
.filter(foo)
518-
.filter('sub', sub)
518+
.mount('sub', sub)
519519
.get('/', (req, res) => {
520520
t.pass('run the main-application route');
521521
t.is(req.foo, 'hello', '~> receives mutatations from middleware');
@@ -524,13 +524,6 @@ tape('tiny::usage::sub-apps', async (t) => {
524524
res.end('hello from main');
525525
});
526526

527-
// sub-app already exists Error checking
528-
t.throws(
529-
() => app.get('/sub'),
530-
`Cannot mount ".get('/sub')" because`,
531-
'throws Error when attempting to add route-handler ona path where Tiny (sub)-app exists'
532-
);
533-
534527
app.build();
535528
app.listen(8080, 'localhost');
536529
const uri = 'http://localhost:8080';
@@ -606,7 +599,8 @@ tape('tiny::usage::middleware w/ sub-app', async (t) => {
606599
req.main = true;
607600
return next();
608601
})
609-
.filter('/api', verify, api);
602+
.filter('/api', verify)
603+
.mount('/api', api);
610604

611605
main.build();
612606
main.listen(8080, 'localhost');

0 commit comments

Comments
 (0)