@@ -461,16 +461,16 @@ test("multiline soa", () => {
461461
462462 // The stringifier should output single-line format
463463 const roundtripped = stringifyZone ( parseZoned ) ;
464- expect ( roundtripped ) . toMatchInlineSnapshot ( `
465- " $ORIGIN localhost.
464+ expect ( roundtripped ) . toEqual ( ` ${ dedent `
465+ $ORIGIN localhost.
466466
467467 ;; SOA Records
468468 @ 86400 IN SOA @ root 1999010100 10800 900 604800 86400
469469
470470 ;; A Records
471471 @ 60 IN A 127.0.0.1
472- "
473- ` ) ;
472+
473+ ` } \n` ) ;
474474} ) ;
475475
476476test ( "multiline soa with comment on first line" , ( ) => {
@@ -574,79 +574,21 @@ test("inoptional", () => {
574574
575575 ` } \n`;
576576 const parseZoned = parseZone ( str ) ;
577- expect ( parseZoned ) . toMatchInlineSnapshot ( `
578- {
579- "records": [
580- {
581- "class": "IN",
582- "comment": null,
583- "content": "1.2.3.4",
584- "name": "example.com",
585- "ttl": 300,
586- "type": "A",
587- },
588- {
589- "class": "IN",
590- "comment": null,
591- "content": "10 mail.example.com.",
592- "name": "example.com",
593- "ttl": 600,
594- "type": "MX",
595- },
596- {
597- "class": "IN",
598- "comment": null,
599- "content": "foo.com.",
600- "name": "example.com",
601- "ttl": 172800,
602- "type": "NS",
603- },
604- {
605- "class": "IN",
606- "comment": null,
607- "content": "bar.com.",
608- "name": "example.com",
609- "ttl": 172800,
610- "type": "NS",
611- },
612- {
613- "class": "IN",
614- "comment": null,
615- "content": ""test"",
616- "name": "example.com",
617- "ttl": 300,
618- "type": "TXT",
619- },
620- {
621- "class": "IN",
622- "comment": null,
623- "content": "foo.com.",
624- "name": "_dmarc.example.com",
625- "ttl": 300,
626- "type": "CNAME",
627- },
628- {
629- "class": "IN",
630- "comment": null,
631- "content": "0 0 5060 sip.foo.com.",
632- "name": "_sip._tcp.example.com",
633- "ttl": 600,
634- "type": "SRV",
635- },
636- {
637- "class": "IN",
638- "comment": null,
639- "content": "0 0 5061 sips.foo.com.",
640- "name": "_sips._tcp.example.com",
641- "ttl": 600,
642- "type": "SRV",
643- },
644- ],
645- }
646- ` ) ;
577+ expect ( parseZoned ) . toEqual ( {
578+ records : [
579+ { class : "IN" , comment : null , content : "1.2.3.4" , name : "example.com" , ttl : 300 , type : "A" } ,
580+ { class : "IN" , comment : null , content : "10 mail.example.com." , name : "example.com" , ttl : 600 , type : "MX" } ,
581+ { class : "IN" , comment : null , content : "foo.com." , name : "example.com" , ttl : 172800 , type : "NS" } ,
582+ { class : "IN" , comment : null , content : "bar.com." , name : "example.com" , ttl : 172800 , type : "NS" } ,
583+ { class : "IN" , comment : null , content : `"test"` , name : "example.com" , ttl : 300 , type : "TXT" } ,
584+ { class : "IN" , comment : null , content : "foo.com." , name : "_dmarc.example.com" , ttl : 300 , type : "CNAME" } ,
585+ { class : "IN" , comment : null , content : "0 0 5060 sip.foo.com." , name : "_sip._tcp.example.com" , ttl : 600 , type : "SRV" } ,
586+ { class : "IN" , comment : null , content : "0 0 5061 sips.foo.com." , name : "_sips._tcp.example.com" , ttl : 600 , type : "SRV" } ,
587+ ] ,
588+ } ) ;
647589 const roundtripped = stringifyZone ( parseZoned ) ;
648- expect ( roundtripped ) . toMatchInlineSnapshot ( `
649- " ;; A Records
590+ expect ( roundtripped ) . toEqual ( ` ${ dedent `
591+ ;; A Records
650592 example.com. 300 IN A 1.2.3.4
651593
652594 ;; CNAME Records
@@ -665,6 +607,6 @@ test("inoptional", () => {
665607
666608 ;; TXT Records
667609 example.com. 300 IN TXT "test"
668- "
669- ` ) ;
610+
611+ ` } \n` ) ;
670612} ) ;
0 commit comments