import { jsonStringifyForHtml } from '..'; describe( 'jsonStringifyForHtml', () => { test( 'should sanitize script tags', () => { expect( jsonStringifyForHtml( '' ) ).toBe( '"\\x3C\\x2Fscript\\x3E"' ); expect( jsonStringifyForHtml( '' ) ).toBe( '"\\x3C\\x2FScript\\x3E"' ); expect( jsonStringifyForHtml( '' ) ).toBe( '"\\x3C\\x2FSCRIPT\\x3E"' ); expect( jsonStringifyForHtml( '' ) ).toBe( '"\\x3C\\x2FScR\\u0130pT\\x3E"' ); } ); test( 'should sanitize HTML comment start', () => { expect( jsonStringifyForHtml( '' ) ).toBe( '"--\\x3E"' ); } ); test( 'should sanitize script tag in comment', () => { expect( jsonStringifyForHtml( '