@@ -74,6 +74,7 @@ describe('parseToElements()', () => {
74
74
} ) ;
75
75
76
76
const sizedTypes = [
77
+ // The array is in order of [TypeByte, ElementName, Int32Size, ElementValue]
77
78
{ type : 'string' , input : [ '02' , '6100' , '00000080' , '6100' ] } ,
78
79
{ type : 'binary' , input : [ '05' , '6100' , '00000080' , '01' ] } ,
79
80
{ type : 'dbpointer' , input : [ '05' , '6100' , '00000080' , '6100' , '00' . repeat ( 12 ) ] } ,
@@ -97,6 +98,7 @@ describe('parseToElements()', () => {
97
98
98
99
context ( 'when an sized element reports a size larger than document' , ( ) => {
99
100
const sizedTypes = [
101
+ // The array is in order of [TypeByte, ElementName, Int32Size, ElementValue]
100
102
{ type : 'string' , input : [ '02' , '6100' , '00000070' , '6100' ] } ,
101
103
{ type : 'binary' , input : [ '05' , '6100' , '00000070' , '01' ] } ,
102
104
{ type : 'dbpointer' , input : [ '05' , '6100' , '00000070' , '6100' , '00' . repeat ( 12 ) ] } ,
@@ -132,7 +134,7 @@ describe('parseToElements()', () => {
132
134
} ) ;
133
135
} ) ;
134
136
135
- context ( 'when given an regexp' , ( ) => {
137
+ context ( 'when given a regexp' , ( ) => {
136
138
context ( 'with no null terminator for the pattern' , ( ) => {
137
139
it ( 'throws an error' , ( ) => {
138
140
const regexp = [
@@ -147,7 +149,7 @@ describe('parseToElements()', () => {
147
149
} ) ;
148
150
} ) ;
149
151
150
- context ( 'with no null terminator for the pattern ' , ( ) => {
152
+ context ( 'with no null terminator for the flags ' , ( ) => {
151
153
it ( 'throws an error' , ( ) => {
152
154
const regexp = [
153
155
Buffer . from ( 'abc' ) . toString ( 'hex' ) ,
0 commit comments