@@ -14,6 +14,7 @@ describe('context', () => {
1414 @Prop ( { context : 'document' } ) doc : Document ;
1515 @Prop ( { context : 'isServer' } ) isServer : boolean ;
1616 @Prop ( { context : 'resourcesUrl' } ) resourcesUrl : string ;
17+ @Prop ( { context : 'publicPath' } ) publicPath : string ;
1718 @Prop ( { context : 'queue' } ) queue : QueueApi ;
1819 }
1920 const { win, doc, rootInstance} = await newSpecPage ( {
@@ -24,6 +25,7 @@ describe('context', () => {
2425 expect ( rootInstance . win ) . toEqual ( win ) ;
2526 expect ( rootInstance . doc ) . toEqual ( doc ) ;
2627 expect ( rootInstance . resourcesUrl ) . toEqual ( '/' ) ;
28+ expect ( rootInstance . publicPath ) . toEqual ( '/' ) ;
2729 expect ( rootInstance . queue . write ) . toEqual ( writeTask ) ;
2830 expect ( rootInstance . queue . read ) . toEqual ( readTask ) ;
2931 expect ( rootInstance . queue . tick ) . not . toBeUndefined ( ) ;
@@ -35,15 +37,18 @@ describe('context', () => {
3537 } )
3638 class CmpA {
3739 @Prop ( { context : 'resourcesUrl' } ) resourcesUrl : boolean ;
40+ @Prop ( { context : 'publicPath' } ) publicPath : boolean ;
3841 }
3942 const { rootInstance} = await newSpecPage ( {
4043 components : [ CmpA ] ,
4144 html : `<cmp-a></cmp-a>` ,
4245 context : {
43- resourcesUrl : '/blabla'
46+ resourcesUrl : '/blabla' ,
47+ publicPath : '/blubblub'
4448 }
4549 } ) ;
4650 expect ( rootInstance . resourcesUrl ) . toEqual ( '/blabla' ) ;
51+ expect ( rootInstance . publicPath ) . toEqual ( '/blubblub' ) ;
4752 } ) ;
4853
4954 it ( 'should extend context' , async ( ) => {
0 commit comments