import fs from 'fs'; import path from 'path'; import { rewriteHTML } from './rewriteHTML'; import { findPublicFolder } from './findPublicFolder'; const input = fs .readFileSync(path.join(findPublicFolder(), 'index.html')) .toString(); test('rewriteHTML substitutes meta tag with existing rewrite value', () => { const result = rewriteHTML(input, '/hosted'); expect( result.includes(''), ).toBe(true); }); test('rewriteHTML substitutes meta tag with empty value', () => { const result = rewriteHTML(input, ''); expect(result.includes('')).toBe( true, ); }); test('rewriteHTML substitutes asset paths correctly with baseUriPath', () => { const result = rewriteHTML(input, '/hosted'); expect( result.includes( '