You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 297ee37
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: test/unitCases/html/__snapshots__/parser.unittest.js.snap
-47Lines changed: 0 additions & 47 deletions
Original file line number
Diff line number
Diff line change
@@ -1,52 +1,5 @@
1
1
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
2
2
3
-
exports[`parseHtml XML mode printing should defer an XML stylesheet to an asynchronous renderer 1`] =`"<svgxmlns=\\"http://www.w3.org/2000/svg\\"><style><![CDATA[a<b{}]]></style><rectstyle='fill:\\"a<b\\"'/><style> </style></svg>"`;
4
-
5
-
exports[`parseHtml XML mode printing should hand SVG and XHTML stylesheets to the embedded renderer 1`] =`
'<svg xmlns="http://www.w3.org/2000/svg"><style>a { b : c }</style><rect style="fill: red"/><style> </style></svg>',
it("should leave a stylesheet as written when nothing renders it",()=>{
921
-
constdocument=
922
-
'<svg xmlns="http://www.w3.org/2000/svg"><style>a { b : c }</style><rect style="fill : red"/></svg>';
923
-
expect(printXml(document,"minify")).toBe(
924
-
'<svg xmlns="http://www.w3.org/2000/svg"><style>a { b : c }</style><rect style="fill : red"/></svg>'
925
-
);
926
-
expect(
927
-
/** @type {{ code: string }} */(
928
-
newSourceProcessor().process(document,{
929
-
xml: true,
930
-
mode: "minify",
931
-
renderEmbeddedSource: ()=>undefined
932
-
})
933
-
).code
934
-
).toBe(document);
935
-
});
936
-
937
-
it("should resolve a prefixed stylesheet's namespace through its own prefix",()=>{
'<s:svg xmlns:s="http://www.w3.org/2000/svg"><s:style>a { b : c }</s:style><style>d { e : f }</style></s:svg>',
943
-
{
944
-
xml: true,
945
-
mode: "minify",
946
-
renderEmbeddedSource: builtinEmbeddedRenderer()
947
-
}
948
-
)
949
-
).code
950
-
).toBe(
951
-
'<s:svg xmlns:s="http://www.w3.org/2000/svg"><s:style>a{b:c}</s:style><style>d { e : f }</style></s:svg>'
952
-
);
953
-
});
954
-
955
-
it("should keep a stylesheet an asynchronous renderer declines",async()=>{
956
-
constdocument=
957
-
'<svg xmlns="http://www.w3.org/2000/svg"><style>a { b : c }</style><rect style="fill : red"/></svg>';
0 commit comments