import { ElementHandle } from 'puppeteer' ; import { launch , props , testIterator } from '../helpers' ; let $document ; describe . each ( testIterator ) ( 'JSON LD - %s' , ( _ , disableJavascript ) => { beforeAll ( async ( ) => { $document = await launch ( { path : '/jsonld' , disableJavascript } ) ; } ) ; it ( 'holds multiple script tags' , async ( ) => { await props < string > ( $document . $$ ( 'head script[type="application/ld+json"]' ) , 'innerHTML' ) . then ( ( content ) => { expect ( content . length ) . toBe ( 9 ) ; content . forEach ( ( json ) => JSON . parse ( json ) ) ; } ) ; } ) ; } ) ;