@@ -14,6 +14,7 @@ describe('context', () => {
14
14
@Prop ( { context : 'document' } ) doc : Document ;
15
15
@Prop ( { context : 'isServer' } ) isServer : boolean ;
16
16
@Prop ( { context : 'resourcesUrl' } ) resourcesUrl : string ;
17
+ @Prop ( { context : 'publicPath' } ) publicPath : string ;
17
18
@Prop ( { context : 'queue' } ) queue : QueueApi ;
18
19
}
19
20
const { win, doc, rootInstance} = await newSpecPage ( {
@@ -24,6 +25,7 @@ describe('context', () => {
24
25
expect ( rootInstance . win ) . toEqual ( win ) ;
25
26
expect ( rootInstance . doc ) . toEqual ( doc ) ;
26
27
expect ( rootInstance . resourcesUrl ) . toEqual ( '/' ) ;
28
+ expect ( rootInstance . publicPath ) . toEqual ( '/' ) ;
27
29
expect ( rootInstance . queue . write ) . toEqual ( writeTask ) ;
28
30
expect ( rootInstance . queue . read ) . toEqual ( readTask ) ;
29
31
expect ( rootInstance . queue . tick ) . not . toBeUndefined ( ) ;
@@ -35,15 +37,18 @@ describe('context', () => {
35
37
} )
36
38
class CmpA {
37
39
@Prop ( { context : 'resourcesUrl' } ) resourcesUrl : boolean ;
40
+ @Prop ( { context : 'publicPath' } ) publicPath : boolean ;
38
41
}
39
42
const { rootInstance} = await newSpecPage ( {
40
43
components : [ CmpA ] ,
41
44
html : `<cmp-a></cmp-a>` ,
42
45
context : {
43
- resourcesUrl : '/blabla'
46
+ resourcesUrl : '/blabla' ,
47
+ publicPath : '/blubblub'
44
48
}
45
49
} ) ;
46
50
expect ( rootInstance . resourcesUrl ) . toEqual ( '/blabla' ) ;
51
+ expect ( rootInstance . publicPath ) . toEqual ( '/blubblub' ) ;
47
52
} ) ;
48
53
49
54
it ( 'should extend context' , async ( ) => {
0 commit comments