@@ -94,18 +94,8 @@ describe("XmlValidator", function () {
9494 } ) ;
9595 expect ( validator ) . to . be . instanceOf ( XmlDSigValidator ) ;
9696 } ) ;
97-
98- it ( "should throw error when neither publicCert nor getCertFromKeyInfo is provided" , function ( ) {
99- expect ( ( ) => {
100- // eslint-disable-next-line @typescript-eslint/no-explicit-any
101- new XmlDSigValidator ( { } as any ) ;
102- } ) . to . throw (
103- "XmlValidator requires either a publicCert or getCertFromKeyInfo function in options." ,
104- ) ;
105- } ) ;
10697 } ) ;
10798
108-
10999 describe ( "validate" , function ( ) {
110100 it ( "should validate a valid signed XML document" , function ( ) {
111101 const xml = "<root><test>content</test></root>" ;
@@ -181,7 +171,7 @@ describe("XmlValidator", function () {
181171 const signedXml = createSignedXml ( xml ) ;
182172
183173 const validator = new XmlDSigValidator ( { publicCert } ) ;
184-
174+
185175 // First validation
186176 const result1 = validator . validate ( signedXml ) ;
187177 expect ( result1 . valid ) . to . be . true ;
@@ -254,10 +244,8 @@ describe("XmlValidator", function () {
254244 expect ( ( ) => validator . validate ( xml ) ) . to . throw ( ) ;
255245 } ) ;
256246 } ) ;
257-
258247} ) ;
259248
260-
261249describe ( "XmlValidator Security Features" , function ( ) {
262250 it ( "should prevent signature wrapping attacks by only returning signed content" , function ( ) {
263251 const xml = "<root><test>content</test><unsigned>malicious</unsigned></root>" ;
0 commit comments