@@ -116,12 +116,22 @@ const metaInfoData = {
116116 { src : 'src1' , async : false , defer : true , [ defaultOptions . tagIDKeyName ] : 'content' , callback : ( ) => { } } ,
117117 { src : 'src-prepend' , async : true , defer : false , pbody : true } ,
118118 { src : 'src2' , async : false , defer : true , body : true } ,
119- { src : 'src3' , async : false , skip : true }
119+ { src : 'src3' , async : false , skip : true } ,
120+ { type : 'application/ld+json' ,
121+ json : {
122+ '@context' : 'http://schema.org' ,
123+ '@type' : 'Organization' ,
124+ 'name' : 'MyApp' ,
125+ 'url' : 'https://www.myurl.com' ,
126+ 'logo' : 'https://www.myurl.com/images/logo.png'
127+ }
128+ }
120129 ] ,
121130 expect : [
122131 '<script data-vue-meta="ssr" src="src1" defer data-vmid="content" onload="this.__vm_l=1"></script>' ,
123132 '<script data-vue-meta="ssr" src="src-prepend" async data-pbody="true"></script>' ,
124- '<script data-vue-meta="ssr" src="src2" defer data-body="true"></script>'
133+ '<script data-vue-meta="ssr" src="src2" defer data-body="true"></script>' ,
134+ '<script data-vue-meta="ssr" type="application/ld+json">{"@context":"http://schema.org","@type":"Organization","name":"MyApp","url":"https://www.myurl.com","logo":"https://www.myurl.com/images/logo.png"}</script>'
125135 ] ,
126136 test ( side , defaultTest ) {
127137 return ( ) => {
@@ -139,12 +149,13 @@ const metaInfoData = {
139149 // ssr doesnt generate data-body tags
140150 const bodyPrepended = this . expect [ 1 ]
141151 const bodyAppended = this . expect [ 2 ]
142- this . expect = [ this . expect [ 0 ] ]
152+ this . expect = [ this . expect . shift ( ) , this . expect . pop ( ) ]
143153
144154 const tags = defaultTest ( )
155+ const html = tags . text ( )
145156
146- expect ( tags . text ( ) ) . not . toContain ( bodyPrepended )
147- expect ( tags . text ( ) ) . not . toContain ( bodyAppended )
157+ expect ( html ) . not . toContain ( bodyPrepended )
158+ expect ( html ) . not . toContain ( bodyAppended )
148159 }
149160 }
150161 }
0 commit comments