From ce2714713afa830833955fc8f686f57e379ddb5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20G=C3=B3is?= Date: Thu, 5 May 2022 16:14:47 +0100 Subject: [PATCH] refactor: use vite html in test (#1561) --- src/lib/util/rewriteHTML.test.ts | 61 +++++--------------------------- 1 file changed, 9 insertions(+), 52 deletions(-) diff --git a/src/lib/util/rewriteHTML.test.ts b/src/lib/util/rewriteHTML.test.ts index 85db0cb21d..e6f525484c 100644 --- a/src/lib/util/rewriteHTML.test.ts +++ b/src/lib/util/rewriteHTML.test.ts @@ -1,86 +1,43 @@ import { rewriteHTML } from './rewriteHTML'; -const input = ` - - - - - - - - - - Unleash - Enterprise ready feature toggles - - - - -
- - - -`; +const input = `Unleash
`; test('rewriteHTML substitutes meta tag with existing rewrite value', () => { const result = rewriteHTML(input, '/hosted'); expect( - result.includes(''), + result.includes(''), ).toBe(true); }); test('rewriteHTML substitutes meta tag with empty value', () => { const result = rewriteHTML(input, ''); - expect(result.includes('')).toBe( - true, - ); + expect(result.includes('')).toBe(true); }); test('rewriteHTML substitutes asset paths correctly with baseUriPath', () => { const result = rewriteHTML(input, '/hosted'); - expect( - result.includes( - '', - ), - ).toBe(true); - expect( - result.includes( - ' ', - ), - ).toBe(true); + expect(result.includes('', - ), - ).toBe(true); - expect( - result.includes( - ' ', - ), - ).toBe(true); + expect(result.includes('