@@ -74,6 +74,7 @@ describe('parseToElements()', () => {
7474 } ) ;
7575
7676 const sizedTypes = [
77+ // The array is in order of [TypeByte, ElementName, Int32Size, ElementValue]
7778 { type : 'string' , input : [ '02' , '6100' , '00000080' , '6100' ] } ,
7879 { type : 'binary' , input : [ '05' , '6100' , '00000080' , '01' ] } ,
7980 { type : 'dbpointer' , input : [ '05' , '6100' , '00000080' , '6100' , '00' . repeat ( 12 ) ] } ,
@@ -97,6 +98,7 @@ describe('parseToElements()', () => {
9798
9899 context ( 'when an sized element reports a size larger than document' , ( ) => {
99100 const sizedTypes = [
101+ // The array is in order of [TypeByte, ElementName, Int32Size, ElementValue]
100102 { type : 'string' , input : [ '02' , '6100' , '00000070' , '6100' ] } ,
101103 { type : 'binary' , input : [ '05' , '6100' , '00000070' , '01' ] } ,
102104 { type : 'dbpointer' , input : [ '05' , '6100' , '00000070' , '6100' , '00' . repeat ( 12 ) ] } ,
@@ -132,7 +134,7 @@ describe('parseToElements()', () => {
132134 } ) ;
133135 } ) ;
134136
135- context ( 'when given an regexp' , ( ) => {
137+ context ( 'when given a regexp' , ( ) => {
136138 context ( 'with no null terminator for the pattern' , ( ) => {
137139 it ( 'throws an error' , ( ) => {
138140 const regexp = [
@@ -147,7 +149,7 @@ describe('parseToElements()', () => {
147149 } ) ;
148150 } ) ;
149151
150- context ( 'with no null terminator for the pattern ' , ( ) => {
152+ context ( 'with no null terminator for the flags ' , ( ) => {
151153 it ( 'throws an error' , ( ) => {
152154 const regexp = [
153155 Buffer . from ( 'abc' ) . toString ( 'hex' ) ,
0 commit comments