import { buildFixture } from '../utils/build' describe('basic browser with ssr page', () => { let html beforeAll(async () => { const fixture = await buildFixture('basic') html = fixture.html }) test('validate ssr', () => { const htmlTag = html.match(/]+)>/)[0] expect(htmlTag).toContain('data-vue-meta-server-rendered') expect(htmlTag).toContain(' lang="en" ') expect(htmlTag).toContain(' amp ') expect(htmlTag).not.toContain('allowfullscreen') expect(html.match(/]*>(.*?)<\/title>/)[1]).toBe('Home | Vue Meta Test') expect(html.match(/]+type="application\/ld\+json"[^>]*>(.*?) JSON.parse(sanitizeCheck[0])).not.toThrow() expect(() => JSON.parse(sanitizeCheck[1])).toThrow() expect(() => JSON.parse(sanitizeCheck[2])).not.toThrow() }) })