File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -515,7 +515,7 @@ tape('tiny::usage::sub-apps', async (t) => {
515
515
516
516
const app = tiny ( )
517
517
. filter ( foo )
518
- . filter ( 'sub' , sub )
518
+ . mount ( 'sub' , sub )
519
519
. get ( '/' , ( req , res ) => {
520
520
t . pass ( 'run the main-application route' ) ;
521
521
t . is ( req . foo , 'hello' , '~> receives mutatations from middleware' ) ;
@@ -524,13 +524,6 @@ tape('tiny::usage::sub-apps', async (t) => {
524
524
res . end ( 'hello from main' ) ;
525
525
} ) ;
526
526
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
-
534
527
app . build ( ) ;
535
528
app . listen ( 8080 , 'localhost' ) ;
536
529
const uri = 'http://localhost:8080' ;
@@ -606,7 +599,8 @@ tape('tiny::usage::middleware w/ sub-app', async (t) => {
606
599
req . main = true ;
607
600
return next ( ) ;
608
601
} )
609
- . filter ( '/api' , verify , api ) ;
602
+ . filter ( '/api' , verify )
603
+ . mount ( '/api' , api ) ;
610
604
611
605
main . build ( ) ;
612
606
main . listen ( 8080 , 'localhost' ) ;
You can’t perform that action at this time.
0 commit comments