bfj 5.3.0 → 6.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc +1 -1
- package/.gitlab-ci.yml +25 -0
- package/AUTHORS +1 -1
- package/CONTRIBUTING.md +4 -4
- package/HISTORY.md +46 -0
- package/README.md +172 -66
- package/package.json +9 -9
- package/src/datastream.js +17 -0
- package/src/eventify.js +13 -6
- package/src/events.js +1 -0
- package/src/index.js +1 -0
- package/src/jsonstream.js +6 -12
- package/src/match.js +218 -0
- package/src/parse.js +1 -0
- package/src/stream.js +23 -0
- package/src/streamify.js +26 -13
- package/src/stringify.js +16 -12
- package/src/unpipe.js +1 -1
- package/src/walk.js +2 -2
- package/src/write.js +16 -13
- package/test/integration.js +147 -56
- package/test/unit/datastream.js +95 -0
- package/test/unit/eventify.js +370 -13
- package/test/unit/jsonstream.js +2 -2
- package/test/unit/match.js +1058 -0
- package/test/unit/parse.js +38 -29
- package/test/unit/streamify.js +32 -8
- package/test/unit/stringify.js +21 -4
- package/test/unit/unpipe.js +3 -3
- package/test/unit/walk.js +309 -149
- package/.travis.yml +0 -12
package/test/unit/walk.js
CHANGED
|
@@ -123,6 +123,10 @@ suite('walk:', () => {
|
|
|
123
123
|
assert.strictEqual(log.counts.error, 0)
|
|
124
124
|
})
|
|
125
125
|
|
|
126
|
+
test('dataError event did not occur', () => {
|
|
127
|
+
assert.strictEqual(log.counts.dataError, 0)
|
|
128
|
+
})
|
|
129
|
+
|
|
126
130
|
test('endLine event did not occur', () => {
|
|
127
131
|
assert.strictEqual(log.counts.endLine, 0)
|
|
128
132
|
})
|
|
@@ -202,6 +206,10 @@ suite('walk:', () => {
|
|
|
202
206
|
assert.strictEqual(log.counts.error, 0)
|
|
203
207
|
})
|
|
204
208
|
|
|
209
|
+
test('dataError event did not occur', () => {
|
|
210
|
+
assert.strictEqual(log.counts.dataError, 0)
|
|
211
|
+
})
|
|
212
|
+
|
|
205
213
|
test('endLine event did not occur', () => {
|
|
206
214
|
assert.strictEqual(log.counts.endLine, 0)
|
|
207
215
|
})
|
|
@@ -281,6 +289,10 @@ suite('walk:', () => {
|
|
|
281
289
|
assert.strictEqual(log.counts.error, 0)
|
|
282
290
|
})
|
|
283
291
|
|
|
292
|
+
test('dataError event did not occur', () => {
|
|
293
|
+
assert.strictEqual(log.counts.dataError, 0)
|
|
294
|
+
})
|
|
295
|
+
|
|
284
296
|
test('endLine event did not occur', () => {
|
|
285
297
|
assert.strictEqual(log.counts.endLine, 0)
|
|
286
298
|
})
|
|
@@ -357,6 +369,10 @@ suite('walk:', () => {
|
|
|
357
369
|
assert.strictEqual(log.counts.error, 0)
|
|
358
370
|
})
|
|
359
371
|
|
|
372
|
+
test('dataError event did not occur', () => {
|
|
373
|
+
assert.strictEqual(log.counts.dataError, 0)
|
|
374
|
+
})
|
|
375
|
+
|
|
360
376
|
test('endLine event did not occur', () => {
|
|
361
377
|
assert.strictEqual(log.counts.endLine, 0)
|
|
362
378
|
})
|
|
@@ -433,6 +449,10 @@ suite('walk:', () => {
|
|
|
433
449
|
assert.strictEqual(log.counts.error, 0)
|
|
434
450
|
})
|
|
435
451
|
|
|
452
|
+
test('dataError event did not occur', () => {
|
|
453
|
+
assert.strictEqual(log.counts.dataError, 0)
|
|
454
|
+
})
|
|
455
|
+
|
|
436
456
|
test('endLine event did not occur', () => {
|
|
437
457
|
assert.strictEqual(log.counts.endLine, 0)
|
|
438
458
|
})
|
|
@@ -509,6 +529,10 @@ suite('walk:', () => {
|
|
|
509
529
|
assert.strictEqual(log.counts.error, 0)
|
|
510
530
|
})
|
|
511
531
|
|
|
532
|
+
test('dataError event did not occur', () => {
|
|
533
|
+
assert.strictEqual(log.counts.dataError, 0)
|
|
534
|
+
})
|
|
535
|
+
|
|
512
536
|
test('endLine event did not occur', () => {
|
|
513
537
|
assert.strictEqual(log.counts.endLine, 0)
|
|
514
538
|
})
|
|
@@ -584,6 +608,10 @@ suite('walk:', () => {
|
|
|
584
608
|
assert.strictEqual(log.counts.error, 0)
|
|
585
609
|
})
|
|
586
610
|
|
|
611
|
+
test('dataError event did not occur', () => {
|
|
612
|
+
assert.strictEqual(log.counts.dataError, 0)
|
|
613
|
+
})
|
|
614
|
+
|
|
587
615
|
test('endLine event did not occur', () => {
|
|
588
616
|
assert.strictEqual(log.counts.endLine, 0)
|
|
589
617
|
})
|
|
@@ -659,6 +687,10 @@ suite('walk:', () => {
|
|
|
659
687
|
assert.strictEqual(log.counts.error, 0)
|
|
660
688
|
})
|
|
661
689
|
|
|
690
|
+
test('dataError event did not occur', () => {
|
|
691
|
+
assert.strictEqual(log.counts.dataError, 0)
|
|
692
|
+
})
|
|
693
|
+
|
|
662
694
|
test('endLine event did not occur', () => {
|
|
663
695
|
assert.strictEqual(log.counts.endLine, 0)
|
|
664
696
|
})
|
|
@@ -694,24 +726,24 @@ suite('walk:', () => {
|
|
|
694
726
|
assert.strictEqual(log.counts.array, 1)
|
|
695
727
|
})
|
|
696
728
|
|
|
697
|
-
test('
|
|
698
|
-
assert.strictEqual(log.counts.
|
|
729
|
+
test('dataError event occurred twice', () => {
|
|
730
|
+
assert.strictEqual(log.counts.dataError, 2)
|
|
699
731
|
})
|
|
700
732
|
|
|
701
|
-
test('
|
|
702
|
-
assert.lengthOf(log.args.
|
|
703
|
-
assert.instanceOf(log.args.
|
|
704
|
-
assert.strictEqual(log.args.
|
|
705
|
-
assert.strictEqual(log.args.
|
|
706
|
-
assert.strictEqual(log.args.
|
|
707
|
-
assert.strictEqual(log.args.
|
|
733
|
+
test('dataError event was dispatched correctly first time', () => {
|
|
734
|
+
assert.lengthOf(log.args.dataError[0], 1)
|
|
735
|
+
assert.instanceOf(log.args.dataError[0][0], Error)
|
|
736
|
+
assert.strictEqual(log.args.dataError[0][0].actual, '}')
|
|
737
|
+
assert.strictEqual(log.args.dataError[0][0].expected, 'value')
|
|
738
|
+
assert.strictEqual(log.args.dataError[0][0].lineNumber, 1)
|
|
739
|
+
assert.strictEqual(log.args.dataError[0][0].columnNumber, 2)
|
|
708
740
|
})
|
|
709
741
|
|
|
710
|
-
test('
|
|
711
|
-
assert.strictEqual(log.args.
|
|
712
|
-
assert.strictEqual(log.args.
|
|
713
|
-
assert.strictEqual(log.args.
|
|
714
|
-
assert.strictEqual(log.args.
|
|
742
|
+
test('dataError event was dispatched correctly second time', () => {
|
|
743
|
+
assert.strictEqual(log.args.dataError[1][0].actual, 'EOF')
|
|
744
|
+
assert.strictEqual(log.args.dataError[1][0].expected, ']')
|
|
745
|
+
assert.strictEqual(log.args.dataError[1][0].lineNumber, 1)
|
|
746
|
+
assert.strictEqual(log.args.dataError[1][0].columnNumber, 3)
|
|
715
747
|
})
|
|
716
748
|
|
|
717
749
|
test('end event occurred once', () => {
|
|
@@ -757,29 +789,29 @@ suite('walk:', () => {
|
|
|
757
789
|
assert.strictEqual(log.counts.object, 1)
|
|
758
790
|
})
|
|
759
791
|
|
|
760
|
-
test('
|
|
761
|
-
assert.strictEqual(log.counts.
|
|
792
|
+
test('dataError event occurred three times', () => {
|
|
793
|
+
assert.strictEqual(log.counts.dataError, 3)
|
|
762
794
|
})
|
|
763
795
|
|
|
764
|
-
test('
|
|
765
|
-
assert.strictEqual(log.args.
|
|
766
|
-
assert.strictEqual(log.args.
|
|
767
|
-
assert.strictEqual(log.args.
|
|
768
|
-
assert.strictEqual(log.args.
|
|
796
|
+
test('dataError event was dispatched correctly first time', () => {
|
|
797
|
+
assert.strictEqual(log.args.dataError[0][0].actual, ']')
|
|
798
|
+
assert.strictEqual(log.args.dataError[0][0].expected, '"')
|
|
799
|
+
assert.strictEqual(log.args.dataError[0][0].lineNumber, 1)
|
|
800
|
+
assert.strictEqual(log.args.dataError[0][0].columnNumber, 2)
|
|
769
801
|
})
|
|
770
802
|
|
|
771
|
-
test('
|
|
772
|
-
assert.strictEqual(log.args.
|
|
773
|
-
assert.strictEqual(log.args.
|
|
774
|
-
assert.strictEqual(log.args.
|
|
775
|
-
assert.strictEqual(log.args.
|
|
803
|
+
test('dataError event was dispatched correctly second time', () => {
|
|
804
|
+
assert.strictEqual(log.args.dataError[1][0].actual, 'EOF')
|
|
805
|
+
assert.strictEqual(log.args.dataError[1][0].expected, '"')
|
|
806
|
+
assert.strictEqual(log.args.dataError[1][0].lineNumber, 1)
|
|
807
|
+
assert.strictEqual(log.args.dataError[1][0].columnNumber, 3)
|
|
776
808
|
})
|
|
777
809
|
|
|
778
|
-
test('
|
|
779
|
-
assert.strictEqual(log.args.
|
|
780
|
-
assert.strictEqual(log.args.
|
|
781
|
-
assert.strictEqual(log.args.
|
|
782
|
-
assert.strictEqual(log.args.
|
|
810
|
+
test('dataError event was dispatched correctly third time', () => {
|
|
811
|
+
assert.strictEqual(log.args.dataError[2][0].actual, 'EOF')
|
|
812
|
+
assert.strictEqual(log.args.dataError[2][0].expected, '}')
|
|
813
|
+
assert.strictEqual(log.args.dataError[2][0].lineNumber, 1)
|
|
814
|
+
assert.strictEqual(log.args.dataError[2][0].columnNumber, 3)
|
|
783
815
|
})
|
|
784
816
|
|
|
785
817
|
test('end event occurred once', () => {
|
|
@@ -821,15 +853,15 @@ suite('walk:', () => {
|
|
|
821
853
|
emitter.on(events.end, done)
|
|
822
854
|
})
|
|
823
855
|
|
|
824
|
-
test('
|
|
825
|
-
assert.strictEqual(log.counts.
|
|
856
|
+
test('dataError event occurred once', () => {
|
|
857
|
+
assert.strictEqual(log.counts.dataError, 1)
|
|
826
858
|
})
|
|
827
859
|
|
|
828
|
-
test('
|
|
829
|
-
assert.strictEqual(log.args.
|
|
830
|
-
assert.strictEqual(log.args.
|
|
831
|
-
assert.strictEqual(log.args.
|
|
832
|
-
assert.strictEqual(log.args.
|
|
860
|
+
test('dataError event was dispatched correctly', () => {
|
|
861
|
+
assert.strictEqual(log.args.dataError[0][0].actual, 'x')
|
|
862
|
+
assert.strictEqual(log.args.dataError[0][0].expected, 'escape character')
|
|
863
|
+
assert.strictEqual(log.args.dataError[0][0].lineNumber, 2)
|
|
864
|
+
assert.strictEqual(log.args.dataError[0][0].columnNumber, 23)
|
|
833
865
|
})
|
|
834
866
|
|
|
835
867
|
test('string event occurred once', () => {
|
|
@@ -867,15 +899,15 @@ suite('walk:', () => {
|
|
|
867
899
|
emitter.on(events.end, done)
|
|
868
900
|
})
|
|
869
901
|
|
|
870
|
-
test('
|
|
871
|
-
assert.strictEqual(log.counts.
|
|
902
|
+
test('dataError event occurred once', () => {
|
|
903
|
+
assert.strictEqual(log.counts.dataError, 1)
|
|
872
904
|
})
|
|
873
905
|
|
|
874
|
-
test('
|
|
875
|
-
assert.strictEqual(log.args.
|
|
876
|
-
assert.strictEqual(log.args.
|
|
877
|
-
assert.strictEqual(log.args.
|
|
878
|
-
assert.strictEqual(log.args.
|
|
906
|
+
test('dataError event was dispatched correctly', () => {
|
|
907
|
+
assert.strictEqual(log.args.dataError[0][0].actual, 'g')
|
|
908
|
+
assert.strictEqual(log.args.dataError[0][0].expected, 'hex digit')
|
|
909
|
+
assert.strictEqual(log.args.dataError[0][0].lineNumber, 1)
|
|
910
|
+
assert.strictEqual(log.args.dataError[0][0].columnNumber, 7)
|
|
879
911
|
})
|
|
880
912
|
|
|
881
913
|
test('string event occurred once', () => {
|
|
@@ -913,15 +945,15 @@ suite('walk:', () => {
|
|
|
913
945
|
emitter.on(events.end, done)
|
|
914
946
|
})
|
|
915
947
|
|
|
916
|
-
test('
|
|
917
|
-
assert.strictEqual(log.counts.
|
|
948
|
+
test('dataError event occurred once', () => {
|
|
949
|
+
assert.strictEqual(log.counts.dataError, 1)
|
|
918
950
|
})
|
|
919
951
|
|
|
920
|
-
test('
|
|
921
|
-
assert.strictEqual(log.args.
|
|
922
|
-
assert.strictEqual(log.args.
|
|
923
|
-
assert.strictEqual(log.args.
|
|
924
|
-
assert.strictEqual(log.args.
|
|
952
|
+
test('dataError event was dispatched correctly', () => {
|
|
953
|
+
assert.strictEqual(log.args.dataError[0][0].actual, 'EOF')
|
|
954
|
+
assert.strictEqual(log.args.dataError[0][0].expected, '"')
|
|
955
|
+
assert.strictEqual(log.args.dataError[0][0].lineNumber, 1)
|
|
956
|
+
assert.strictEqual(log.args.dataError[0][0].columnNumber, 5)
|
|
925
957
|
})
|
|
926
958
|
|
|
927
959
|
test('end event occurred once', () => {
|
|
@@ -959,15 +991,15 @@ suite('walk:', () => {
|
|
|
959
991
|
assert.strictEqual(log.counts.number, 0)
|
|
960
992
|
})
|
|
961
993
|
|
|
962
|
-
test('
|
|
963
|
-
assert.strictEqual(log.counts.
|
|
994
|
+
test('dataError event occurred once', () => {
|
|
995
|
+
assert.strictEqual(log.counts.dataError, 1)
|
|
964
996
|
})
|
|
965
997
|
|
|
966
|
-
test('
|
|
967
|
-
assert.strictEqual(log.args.
|
|
968
|
-
assert.strictEqual(log.args.
|
|
969
|
-
assert.strictEqual(log.args.
|
|
970
|
-
assert.strictEqual(log.args.
|
|
998
|
+
test('dataError event was dispatched correctly first time', () => {
|
|
999
|
+
assert.strictEqual(log.args.dataError[0][0].actual, 'EOF')
|
|
1000
|
+
assert.strictEqual(log.args.dataError[0][0].expected, 'exponent')
|
|
1001
|
+
assert.strictEqual(log.args.dataError[0][0].lineNumber, 1)
|
|
1002
|
+
assert.strictEqual(log.args.dataError[0][0].columnNumber, 3)
|
|
971
1003
|
})
|
|
972
1004
|
|
|
973
1005
|
test('end event occurred once', () => {
|
|
@@ -1009,22 +1041,22 @@ suite('walk:', () => {
|
|
|
1009
1041
|
assert.strictEqual(log.args.number[0][0], 42)
|
|
1010
1042
|
})
|
|
1011
1043
|
|
|
1012
|
-
test('
|
|
1013
|
-
assert.strictEqual(log.counts.
|
|
1044
|
+
test('dataError event occurred twice', () => {
|
|
1045
|
+
assert.strictEqual(log.counts.dataError, 2)
|
|
1014
1046
|
})
|
|
1015
1047
|
|
|
1016
|
-
test('
|
|
1017
|
-
assert.strictEqual(log.args.
|
|
1018
|
-
assert.strictEqual(log.args.
|
|
1019
|
-
assert.strictEqual(log.args.
|
|
1020
|
-
assert.strictEqual(log.args.
|
|
1048
|
+
test('dataError event was dispatched correctly first time', () => {
|
|
1049
|
+
assert.strictEqual(log.args.dataError[0][0].actual, 'f')
|
|
1050
|
+
assert.strictEqual(log.args.dataError[0][0].expected, 'EOF')
|
|
1051
|
+
assert.strictEqual(log.args.dataError[0][0].lineNumber, 1)
|
|
1052
|
+
assert.strictEqual(log.args.dataError[0][0].columnNumber, 3)
|
|
1021
1053
|
})
|
|
1022
1054
|
|
|
1023
|
-
test('
|
|
1024
|
-
assert.strictEqual(log.args.
|
|
1025
|
-
assert.strictEqual(log.args.
|
|
1026
|
-
assert.strictEqual(log.args.
|
|
1027
|
-
assert.strictEqual(log.args.
|
|
1055
|
+
test('dataError event was dispatched correctly second time', () => {
|
|
1056
|
+
assert.strictEqual(log.args.dataError[1][0].actual, 'EOF')
|
|
1057
|
+
assert.strictEqual(log.args.dataError[1][0].expected, 'a')
|
|
1058
|
+
assert.strictEqual(log.args.dataError[1][0].lineNumber, 1)
|
|
1059
|
+
assert.strictEqual(log.args.dataError[1][0].columnNumber, 4)
|
|
1028
1060
|
})
|
|
1029
1061
|
|
|
1030
1062
|
test('end event occurred once', () => {
|
|
@@ -1058,15 +1090,15 @@ suite('walk:', () => {
|
|
|
1058
1090
|
emitter.on(events.end, done)
|
|
1059
1091
|
})
|
|
1060
1092
|
|
|
1061
|
-
test('
|
|
1062
|
-
assert.strictEqual(log.counts.
|
|
1093
|
+
test('dataError event occurred once', () => {
|
|
1094
|
+
assert.strictEqual(log.counts.dataError, 1)
|
|
1063
1095
|
})
|
|
1064
1096
|
|
|
1065
|
-
test('
|
|
1066
|
-
assert.strictEqual(log.args.
|
|
1067
|
-
assert.strictEqual(log.args.
|
|
1068
|
-
assert.strictEqual(log.args.
|
|
1069
|
-
assert.strictEqual(log.args.
|
|
1097
|
+
test('dataError event was dispatched correctly', () => {
|
|
1098
|
+
assert.strictEqual(log.args.dataError[0][0].actual, 'd')
|
|
1099
|
+
assert.strictEqual(log.args.dataError[0][0].expected, 'e')
|
|
1100
|
+
assert.strictEqual(log.args.dataError[0][0].lineNumber, 1)
|
|
1101
|
+
assert.strictEqual(log.args.dataError[0][0].columnNumber, 5)
|
|
1070
1102
|
})
|
|
1071
1103
|
|
|
1072
1104
|
test('end event occurred once', () => {
|
|
@@ -1100,15 +1132,15 @@ suite('walk:', () => {
|
|
|
1100
1132
|
emitter.on(events.end, done)
|
|
1101
1133
|
})
|
|
1102
1134
|
|
|
1103
|
-
test('
|
|
1104
|
-
assert.strictEqual(log.counts.
|
|
1135
|
+
test('dataError event occurred once', () => {
|
|
1136
|
+
assert.strictEqual(log.counts.dataError, 1)
|
|
1105
1137
|
})
|
|
1106
1138
|
|
|
1107
|
-
test('
|
|
1108
|
-
assert.strictEqual(log.args.
|
|
1109
|
-
assert.strictEqual(log.args.
|
|
1110
|
-
assert.strictEqual(log.args.
|
|
1111
|
-
assert.strictEqual(log.args.
|
|
1139
|
+
test('dataError event was dispatched correctly', () => {
|
|
1140
|
+
assert.strictEqual(log.args.dataError[0][0].actual, 'EOF')
|
|
1141
|
+
assert.strictEqual(log.args.dataError[0][0].expected, 'l')
|
|
1142
|
+
assert.strictEqual(log.args.dataError[0][0].lineNumber, 1)
|
|
1143
|
+
assert.strictEqual(log.args.dataError[0][0].columnNumber, 4)
|
|
1112
1144
|
})
|
|
1113
1145
|
|
|
1114
1146
|
test('end event occurred once', () => {
|
|
@@ -1142,36 +1174,36 @@ suite('walk:', () => {
|
|
|
1142
1174
|
emitter.on(events.end, done)
|
|
1143
1175
|
})
|
|
1144
1176
|
|
|
1145
|
-
test('
|
|
1146
|
-
assert.strictEqual(log.counts.
|
|
1177
|
+
test('dataError event occurred four times', () => {
|
|
1178
|
+
assert.strictEqual(log.counts.dataError, 4)
|
|
1147
1179
|
})
|
|
1148
1180
|
|
|
1149
|
-
test('
|
|
1150
|
-
assert.strictEqual(log.args.
|
|
1151
|
-
assert.strictEqual(log.args.
|
|
1152
|
-
assert.strictEqual(log.args.
|
|
1153
|
-
assert.strictEqual(log.args.
|
|
1181
|
+
test('dataError event was dispatched correctly first time', () => {
|
|
1182
|
+
assert.strictEqual(log.args.dataError[0][0].actual, 'R')
|
|
1183
|
+
assert.strictEqual(log.args.dataError[0][0].expected, 'r')
|
|
1184
|
+
assert.strictEqual(log.args.dataError[0][0].lineNumber, 1)
|
|
1185
|
+
assert.strictEqual(log.args.dataError[0][0].columnNumber, 2)
|
|
1154
1186
|
})
|
|
1155
1187
|
|
|
1156
|
-
test('
|
|
1157
|
-
assert.strictEqual(log.args.
|
|
1158
|
-
assert.strictEqual(log.args.
|
|
1159
|
-
assert.strictEqual(log.args.
|
|
1160
|
-
assert.strictEqual(log.args.
|
|
1188
|
+
test('dataError event was dispatched correctly second time', () => {
|
|
1189
|
+
assert.strictEqual(log.args.dataError[1][0].actual, 'u')
|
|
1190
|
+
assert.strictEqual(log.args.dataError[1][0].expected, 'EOF')
|
|
1191
|
+
assert.strictEqual(log.args.dataError[1][0].lineNumber, 1)
|
|
1192
|
+
assert.strictEqual(log.args.dataError[1][0].columnNumber, 3)
|
|
1161
1193
|
})
|
|
1162
1194
|
|
|
1163
|
-
test('
|
|
1164
|
-
assert.strictEqual(log.args.
|
|
1165
|
-
assert.strictEqual(log.args.
|
|
1166
|
-
assert.strictEqual(log.args.
|
|
1167
|
-
assert.strictEqual(log.args.
|
|
1195
|
+
test('dataError event was dispatched correctly third time', () => {
|
|
1196
|
+
assert.strictEqual(log.args.dataError[2][0].actual, 'u')
|
|
1197
|
+
assert.strictEqual(log.args.dataError[2][0].expected, 'value')
|
|
1198
|
+
assert.strictEqual(log.args.dataError[2][0].lineNumber, 1)
|
|
1199
|
+
assert.strictEqual(log.args.dataError[2][0].columnNumber, 3)
|
|
1168
1200
|
})
|
|
1169
1201
|
|
|
1170
|
-
test('
|
|
1171
|
-
assert.strictEqual(log.args.
|
|
1172
|
-
assert.strictEqual(log.args.
|
|
1173
|
-
assert.strictEqual(log.args.
|
|
1174
|
-
assert.strictEqual(log.args.
|
|
1202
|
+
test('dataError event was dispatched correctly fourth time', () => {
|
|
1203
|
+
assert.strictEqual(log.args.dataError[3][0].actual, 'e')
|
|
1204
|
+
assert.strictEqual(log.args.dataError[3][0].expected, 'value')
|
|
1205
|
+
assert.strictEqual(log.args.dataError[3][0].lineNumber, 1)
|
|
1206
|
+
assert.strictEqual(log.args.dataError[3][0].columnNumber, 4)
|
|
1175
1207
|
})
|
|
1176
1208
|
|
|
1177
1209
|
test('end event occurred once', () => {
|
|
@@ -1221,6 +1253,10 @@ suite('walk:', () => {
|
|
|
1221
1253
|
assert.strictEqual(log.counts.error, 0)
|
|
1222
1254
|
})
|
|
1223
1255
|
|
|
1256
|
+
test('dataError event did not occur', () => {
|
|
1257
|
+
assert.strictEqual(log.counts.dataError, 0)
|
|
1258
|
+
})
|
|
1259
|
+
|
|
1224
1260
|
test('endLine event did not occur', () => {
|
|
1225
1261
|
assert.strictEqual(log.counts.endLine, 0)
|
|
1226
1262
|
})
|
|
@@ -1263,6 +1299,10 @@ suite('walk:', () => {
|
|
|
1263
1299
|
test('error event did not occur', () => {
|
|
1264
1300
|
assert.strictEqual(log.counts.error, 0)
|
|
1265
1301
|
})
|
|
1302
|
+
|
|
1303
|
+
test('dataError event did not occur', () => {
|
|
1304
|
+
assert.strictEqual(log.counts.dataError, 0)
|
|
1305
|
+
})
|
|
1266
1306
|
})
|
|
1267
1307
|
|
|
1268
1308
|
suite('two arrays inside array with whitespace:', () => {
|
|
@@ -1302,6 +1342,10 @@ suite('walk:', () => {
|
|
|
1302
1342
|
test('error event did not occur', () => {
|
|
1303
1343
|
assert.strictEqual(log.counts.error, 0)
|
|
1304
1344
|
})
|
|
1345
|
+
|
|
1346
|
+
test('dataError event did not occur', () => {
|
|
1347
|
+
assert.strictEqual(log.counts.dataError, 0)
|
|
1348
|
+
})
|
|
1305
1349
|
})
|
|
1306
1350
|
|
|
1307
1351
|
suite('two arrays inside array without comma:', () => {
|
|
@@ -1334,15 +1378,15 @@ suite('walk:', () => {
|
|
|
1334
1378
|
assert.strictEqual(log.counts.endArray, 3)
|
|
1335
1379
|
})
|
|
1336
1380
|
|
|
1337
|
-
test('
|
|
1338
|
-
assert.strictEqual(log.counts.
|
|
1381
|
+
test('dataError event occurred once', () => {
|
|
1382
|
+
assert.strictEqual(log.counts.dataError, 1)
|
|
1339
1383
|
})
|
|
1340
1384
|
|
|
1341
|
-
test('
|
|
1342
|
-
assert.strictEqual(log.args.
|
|
1343
|
-
assert.strictEqual(log.args.
|
|
1344
|
-
assert.strictEqual(log.args.
|
|
1345
|
-
assert.strictEqual(log.args.
|
|
1385
|
+
test('dataError event was dispatched correctly', () => {
|
|
1386
|
+
assert.strictEqual(log.args.dataError[0][0].actual, '[')
|
|
1387
|
+
assert.strictEqual(log.args.dataError[0][0].expected, ',')
|
|
1388
|
+
assert.strictEqual(log.args.dataError[0][0].lineNumber, 1)
|
|
1389
|
+
assert.strictEqual(log.args.dataError[0][0].columnNumber, 4)
|
|
1346
1390
|
})
|
|
1347
1391
|
|
|
1348
1392
|
test('end event occurred once', () => {
|
|
@@ -1400,6 +1444,10 @@ suite('walk:', () => {
|
|
|
1400
1444
|
assert.strictEqual(log.counts.error, 0)
|
|
1401
1445
|
})
|
|
1402
1446
|
|
|
1447
|
+
test('dataError event did not occur', () => {
|
|
1448
|
+
assert.strictEqual(log.counts.dataError, 0)
|
|
1449
|
+
})
|
|
1450
|
+
|
|
1403
1451
|
test('endLine event did not occur', () => {
|
|
1404
1452
|
assert.strictEqual(log.counts.endLine, 0)
|
|
1405
1453
|
})
|
|
@@ -1450,6 +1498,10 @@ suite('walk:', () => {
|
|
|
1450
1498
|
test('error event did not occur', () => {
|
|
1451
1499
|
assert.strictEqual(log.counts.error, 0)
|
|
1452
1500
|
})
|
|
1501
|
+
|
|
1502
|
+
test('dataError event did not occur', () => {
|
|
1503
|
+
assert.strictEqual(log.counts.dataError, 0)
|
|
1504
|
+
})
|
|
1453
1505
|
})
|
|
1454
1506
|
|
|
1455
1507
|
suite('two objects inside array with whitespace:', () => {
|
|
@@ -1497,6 +1549,10 @@ suite('walk:', () => {
|
|
|
1497
1549
|
test('error event did not occur', () => {
|
|
1498
1550
|
assert.strictEqual(log.counts.error, 0)
|
|
1499
1551
|
})
|
|
1552
|
+
|
|
1553
|
+
test('dataError event did not occur', () => {
|
|
1554
|
+
assert.strictEqual(log.counts.dataError, 0)
|
|
1555
|
+
})
|
|
1500
1556
|
})
|
|
1501
1557
|
|
|
1502
1558
|
suite('two objects inside array without comma:', () => {
|
|
@@ -1533,15 +1589,15 @@ suite('walk:', () => {
|
|
|
1533
1589
|
assert.strictEqual(log.counts.endObject, 2)
|
|
1534
1590
|
})
|
|
1535
1591
|
|
|
1536
|
-
test('
|
|
1537
|
-
assert.strictEqual(log.counts.
|
|
1592
|
+
test('dataError event occurred once', () => {
|
|
1593
|
+
assert.strictEqual(log.counts.dataError, 1)
|
|
1538
1594
|
})
|
|
1539
1595
|
|
|
1540
|
-
test('
|
|
1541
|
-
assert.strictEqual(log.args.
|
|
1542
|
-
assert.strictEqual(log.args.
|
|
1543
|
-
assert.strictEqual(log.args.
|
|
1544
|
-
assert.strictEqual(log.args.
|
|
1596
|
+
test('dataError event was dispatched correctly', () => {
|
|
1597
|
+
assert.strictEqual(log.args.dataError[0][0].actual, '{')
|
|
1598
|
+
assert.strictEqual(log.args.dataError[0][0].expected, ',')
|
|
1599
|
+
assert.strictEqual(log.args.dataError[0][0].lineNumber, 1)
|
|
1600
|
+
assert.strictEqual(log.args.dataError[0][0].columnNumber, 6)
|
|
1545
1601
|
})
|
|
1546
1602
|
|
|
1547
1603
|
test('endArray event occurred once', () => {
|
|
@@ -1603,6 +1659,10 @@ suite('walk:', () => {
|
|
|
1603
1659
|
assert.strictEqual(log.counts.error, 0)
|
|
1604
1660
|
})
|
|
1605
1661
|
|
|
1662
|
+
test('dataError event did not occur', () => {
|
|
1663
|
+
assert.strictEqual(log.counts.dataError, 0)
|
|
1664
|
+
})
|
|
1665
|
+
|
|
1606
1666
|
test('endLine event did not occur', () => {
|
|
1607
1667
|
assert.strictEqual(log.counts.endLine, 0)
|
|
1608
1668
|
})
|
|
@@ -1657,6 +1717,10 @@ suite('walk:', () => {
|
|
|
1657
1717
|
test('error event did not occur', () => {
|
|
1658
1718
|
assert.strictEqual(log.counts.error, 0)
|
|
1659
1719
|
})
|
|
1720
|
+
|
|
1721
|
+
test('dataError event did not occur', () => {
|
|
1722
|
+
assert.strictEqual(log.counts.dataError, 0)
|
|
1723
|
+
})
|
|
1660
1724
|
})
|
|
1661
1725
|
|
|
1662
1726
|
suite('two strings inside array with whitespace:', () => {
|
|
@@ -1708,6 +1772,10 @@ suite('walk:', () => {
|
|
|
1708
1772
|
test('error event did not occur', () => {
|
|
1709
1773
|
assert.strictEqual(log.counts.error, 0)
|
|
1710
1774
|
})
|
|
1775
|
+
|
|
1776
|
+
test('dataError event did not occur', () => {
|
|
1777
|
+
assert.strictEqual(log.counts.dataError, 0)
|
|
1778
|
+
})
|
|
1711
1779
|
})
|
|
1712
1780
|
|
|
1713
1781
|
suite('literal inside array:', () => {
|
|
@@ -1755,6 +1823,10 @@ suite('walk:', () => {
|
|
|
1755
1823
|
test('error event did not occur', () => {
|
|
1756
1824
|
assert.strictEqual(log.counts.error, 0)
|
|
1757
1825
|
})
|
|
1826
|
+
|
|
1827
|
+
test('dataError event did not occur', () => {
|
|
1828
|
+
assert.strictEqual(log.counts.dataError, 0)
|
|
1829
|
+
})
|
|
1758
1830
|
})
|
|
1759
1831
|
|
|
1760
1832
|
suite('two literals inside array:', () => {
|
|
@@ -1806,6 +1878,10 @@ suite('walk:', () => {
|
|
|
1806
1878
|
test('error event did not occur', () => {
|
|
1807
1879
|
assert.strictEqual(log.counts.error, 0)
|
|
1808
1880
|
})
|
|
1881
|
+
|
|
1882
|
+
test('dataError event did not occur', () => {
|
|
1883
|
+
assert.strictEqual(log.counts.dataError, 0)
|
|
1884
|
+
})
|
|
1809
1885
|
})
|
|
1810
1886
|
|
|
1811
1887
|
suite('two literals inside array with whitespace:', () => {
|
|
@@ -1857,6 +1933,10 @@ suite('walk:', () => {
|
|
|
1857
1933
|
test('error event did not occur', () => {
|
|
1858
1934
|
assert.strictEqual(log.counts.error, 0)
|
|
1859
1935
|
})
|
|
1936
|
+
|
|
1937
|
+
test('dataError event did not occur', () => {
|
|
1938
|
+
assert.strictEqual(log.counts.dataError, 0)
|
|
1939
|
+
})
|
|
1860
1940
|
})
|
|
1861
1941
|
|
|
1862
1942
|
suite('number inside array:', () => {
|
|
@@ -1904,6 +1984,10 @@ suite('walk:', () => {
|
|
|
1904
1984
|
test('error event did not occur', () => {
|
|
1905
1985
|
assert.strictEqual(log.counts.error, 0)
|
|
1906
1986
|
})
|
|
1987
|
+
|
|
1988
|
+
test('dataError event did not occur', () => {
|
|
1989
|
+
assert.strictEqual(log.counts.dataError, 0)
|
|
1990
|
+
})
|
|
1907
1991
|
})
|
|
1908
1992
|
|
|
1909
1993
|
suite('two numbers inside array:', () => {
|
|
@@ -1955,6 +2039,10 @@ suite('walk:', () => {
|
|
|
1955
2039
|
test('error event did not occur', () => {
|
|
1956
2040
|
assert.strictEqual(log.counts.error, 0)
|
|
1957
2041
|
})
|
|
2042
|
+
|
|
2043
|
+
test('dataError event did not occur', () => {
|
|
2044
|
+
assert.strictEqual(log.counts.dataError, 0)
|
|
2045
|
+
})
|
|
1958
2046
|
})
|
|
1959
2047
|
|
|
1960
2048
|
suite('two numbers inside array with whitespace:', () => {
|
|
@@ -2006,6 +2094,10 @@ suite('walk:', () => {
|
|
|
2006
2094
|
test('error event did not occur', () => {
|
|
2007
2095
|
assert.strictEqual(log.counts.error, 0)
|
|
2008
2096
|
})
|
|
2097
|
+
|
|
2098
|
+
test('dataError event did not occur', () => {
|
|
2099
|
+
assert.strictEqual(log.counts.dataError, 0)
|
|
2100
|
+
})
|
|
2009
2101
|
})
|
|
2010
2102
|
|
|
2011
2103
|
suite('object inside object:', () => {
|
|
@@ -2054,6 +2146,10 @@ suite('walk:', () => {
|
|
|
2054
2146
|
test('error event did not occur', () => {
|
|
2055
2147
|
assert.strictEqual(log.counts.error, 0)
|
|
2056
2148
|
})
|
|
2149
|
+
|
|
2150
|
+
test('dataError event did not occur', () => {
|
|
2151
|
+
assert.strictEqual(log.counts.dataError, 0)
|
|
2152
|
+
})
|
|
2057
2153
|
})
|
|
2058
2154
|
|
|
2059
2155
|
suite('array and object inside object:', () => {
|
|
@@ -2113,6 +2209,10 @@ suite('walk:', () => {
|
|
|
2113
2209
|
test('error event did not occur', () => {
|
|
2114
2210
|
assert.strictEqual(log.counts.error, 0)
|
|
2115
2211
|
})
|
|
2212
|
+
|
|
2213
|
+
test('dataError event did not occur', () => {
|
|
2214
|
+
assert.strictEqual(log.counts.dataError, 0)
|
|
2215
|
+
})
|
|
2116
2216
|
})
|
|
2117
2217
|
|
|
2118
2218
|
suite('string, literal and number inside object with whitespace:', () => {
|
|
@@ -2192,6 +2292,10 @@ suite('walk:', () => {
|
|
|
2192
2292
|
test('error event did not occur', () => {
|
|
2193
2293
|
assert.strictEqual(log.counts.error, 0)
|
|
2194
2294
|
})
|
|
2295
|
+
|
|
2296
|
+
test('dataError event did not occur', () => {
|
|
2297
|
+
assert.strictEqual(log.counts.dataError, 0)
|
|
2298
|
+
})
|
|
2195
2299
|
})
|
|
2196
2300
|
|
|
2197
2301
|
suite('two objects inside object without comma:', () => {
|
|
@@ -2232,15 +2336,15 @@ suite('walk:', () => {
|
|
|
2232
2336
|
assert.strictEqual(log.args.property[1][0], 'bar')
|
|
2233
2337
|
})
|
|
2234
2338
|
|
|
2235
|
-
test('
|
|
2236
|
-
assert.strictEqual(log.counts.
|
|
2339
|
+
test('dataError event occurred once', () => {
|
|
2340
|
+
assert.strictEqual(log.counts.dataError, 1)
|
|
2237
2341
|
})
|
|
2238
2342
|
|
|
2239
|
-
test('
|
|
2240
|
-
assert.strictEqual(log.args.
|
|
2241
|
-
assert.strictEqual(log.args.
|
|
2242
|
-
assert.strictEqual(log.args.
|
|
2243
|
-
assert.strictEqual(log.args.
|
|
2343
|
+
test('dataError event was dispatched correctly', () => {
|
|
2344
|
+
assert.strictEqual(log.args.dataError[0][0].actual, '"')
|
|
2345
|
+
assert.strictEqual(log.args.dataError[0][0].expected, ',')
|
|
2346
|
+
assert.strictEqual(log.args.dataError[0][0].lineNumber, 1)
|
|
2347
|
+
assert.strictEqual(log.args.dataError[0][0].columnNumber, 10)
|
|
2244
2348
|
})
|
|
2245
2349
|
|
|
2246
2350
|
test('endObject event occurred three times', () => {
|
|
@@ -2278,29 +2382,29 @@ suite('walk:', () => {
|
|
|
2278
2382
|
assert.strictEqual(log.counts.object, 1)
|
|
2279
2383
|
})
|
|
2280
2384
|
|
|
2281
|
-
test('
|
|
2282
|
-
assert.strictEqual(log.counts.
|
|
2385
|
+
test('dataError event occurred once', () => {
|
|
2386
|
+
assert.strictEqual(log.counts.dataError, 3)
|
|
2283
2387
|
})
|
|
2284
2388
|
|
|
2285
|
-
test('
|
|
2286
|
-
assert.strictEqual(log.args.
|
|
2287
|
-
assert.strictEqual(log.args.
|
|
2288
|
-
assert.strictEqual(log.args.
|
|
2289
|
-
assert.strictEqual(log.args.
|
|
2389
|
+
test('dataError event was dispatched correctly first time', () => {
|
|
2390
|
+
assert.strictEqual(log.args.dataError[0][0].actual, 'f')
|
|
2391
|
+
assert.strictEqual(log.args.dataError[0][0].expected, '"')
|
|
2392
|
+
assert.strictEqual(log.args.dataError[0][0].lineNumber, 1)
|
|
2393
|
+
assert.strictEqual(log.args.dataError[0][0].columnNumber, 2)
|
|
2290
2394
|
})
|
|
2291
2395
|
|
|
2292
|
-
test('
|
|
2293
|
-
assert.strictEqual(log.args.
|
|
2294
|
-
assert.strictEqual(log.args.
|
|
2295
|
-
assert.strictEqual(log.args.
|
|
2296
|
-
assert.strictEqual(log.args.
|
|
2396
|
+
test('dataError event was dispatched correctly second time', () => {
|
|
2397
|
+
assert.strictEqual(log.args.dataError[1][0].actual, 'EOF')
|
|
2398
|
+
assert.strictEqual(log.args.dataError[1][0].expected, '"')
|
|
2399
|
+
assert.strictEqual(log.args.dataError[1][0].lineNumber, 1)
|
|
2400
|
+
assert.strictEqual(log.args.dataError[1][0].columnNumber, 9)
|
|
2297
2401
|
})
|
|
2298
2402
|
|
|
2299
|
-
test('
|
|
2300
|
-
assert.strictEqual(log.args.
|
|
2301
|
-
assert.strictEqual(log.args.
|
|
2302
|
-
assert.strictEqual(log.args.
|
|
2303
|
-
assert.strictEqual(log.args.
|
|
2403
|
+
test('dataError event was dispatched correctly third time', () => {
|
|
2404
|
+
assert.strictEqual(log.args.dataError[2][0].actual, 'EOF')
|
|
2405
|
+
assert.strictEqual(log.args.dataError[2][0].expected, '}')
|
|
2406
|
+
assert.strictEqual(log.args.dataError[2][0].lineNumber, 1)
|
|
2407
|
+
assert.strictEqual(log.args.dataError[2][0].columnNumber, 9)
|
|
2304
2408
|
})
|
|
2305
2409
|
|
|
2306
2410
|
test('end event occurred once', () => {
|
|
@@ -2374,6 +2478,10 @@ suite('walk:', () => {
|
|
|
2374
2478
|
test('error event did not occur', () => {
|
|
2375
2479
|
assert.strictEqual(log.counts.error, 0)
|
|
2376
2480
|
})
|
|
2481
|
+
|
|
2482
|
+
test('dataError event did not occur', () => {
|
|
2483
|
+
assert.strictEqual(log.counts.dataError, 0)
|
|
2484
|
+
})
|
|
2377
2485
|
})
|
|
2378
2486
|
|
|
2379
2487
|
suite('empty array containing whitespace:', () => {
|
|
@@ -2413,6 +2521,10 @@ suite('walk:', () => {
|
|
|
2413
2521
|
test('error event did not occur', () => {
|
|
2414
2522
|
assert.strictEqual(log.counts.error, 0)
|
|
2415
2523
|
})
|
|
2524
|
+
|
|
2525
|
+
test('dataError event did not occur', () => {
|
|
2526
|
+
assert.strictEqual(log.counts.dataError, 0)
|
|
2527
|
+
})
|
|
2416
2528
|
})
|
|
2417
2529
|
|
|
2418
2530
|
suite('chunked empty array:', () => {
|
|
@@ -2453,6 +2565,10 @@ suite('walk:', () => {
|
|
|
2453
2565
|
test('error event did not occur', () => {
|
|
2454
2566
|
assert.strictEqual(log.counts.error, 0)
|
|
2455
2567
|
})
|
|
2568
|
+
|
|
2569
|
+
test('dataError event did not occur', () => {
|
|
2570
|
+
assert.strictEqual(log.counts.dataError, 0)
|
|
2571
|
+
})
|
|
2456
2572
|
})
|
|
2457
2573
|
|
|
2458
2574
|
suite('chunked empty object with whitespace:', () => {
|
|
@@ -2499,6 +2615,10 @@ suite('walk:', () => {
|
|
|
2499
2615
|
test('error event did not occur', () => {
|
|
2500
2616
|
assert.strictEqual(log.counts.error, 0)
|
|
2501
2617
|
})
|
|
2618
|
+
|
|
2619
|
+
test('dataError event did not occur', () => {
|
|
2620
|
+
assert.strictEqual(log.counts.dataError, 0)
|
|
2621
|
+
})
|
|
2502
2622
|
})
|
|
2503
2623
|
|
|
2504
2624
|
suite('chunked string:', () => {
|
|
@@ -2547,6 +2667,10 @@ suite('walk:', () => {
|
|
|
2547
2667
|
test('error event did not occur', () => {
|
|
2548
2668
|
assert.strictEqual(log.counts.error, 0)
|
|
2549
2669
|
})
|
|
2670
|
+
|
|
2671
|
+
test('dataError event did not occur', () => {
|
|
2672
|
+
assert.strictEqual(log.counts.dataError, 0)
|
|
2673
|
+
})
|
|
2550
2674
|
})
|
|
2551
2675
|
|
|
2552
2676
|
suite('chunked number:', () => {
|
|
@@ -2594,6 +2718,10 @@ suite('walk:', () => {
|
|
|
2594
2718
|
test('error event did not occur', () => {
|
|
2595
2719
|
assert.strictEqual(log.counts.error, 0)
|
|
2596
2720
|
})
|
|
2721
|
+
|
|
2722
|
+
test('dataError event did not occur', () => {
|
|
2723
|
+
assert.strictEqual(log.counts.dataError, 0)
|
|
2724
|
+
})
|
|
2597
2725
|
})
|
|
2598
2726
|
|
|
2599
2727
|
suite('chunked literal:', () => {
|
|
@@ -2637,6 +2765,10 @@ suite('walk:', () => {
|
|
|
2637
2765
|
test('error event did not occur', () => {
|
|
2638
2766
|
assert.strictEqual(log.counts.error, 0)
|
|
2639
2767
|
})
|
|
2768
|
+
|
|
2769
|
+
test('dataError event did not occur', () => {
|
|
2770
|
+
assert.strictEqual(log.counts.dataError, 0)
|
|
2771
|
+
})
|
|
2640
2772
|
})
|
|
2641
2773
|
|
|
2642
2774
|
suite('populated array with discard=1:', () => {
|
|
@@ -2697,6 +2829,10 @@ suite('walk:', () => {
|
|
|
2697
2829
|
test('error event did not occur', () => {
|
|
2698
2830
|
assert.strictEqual(log.counts.error, 0)
|
|
2699
2831
|
})
|
|
2832
|
+
|
|
2833
|
+
test('dataError event did not occur', () => {
|
|
2834
|
+
assert.strictEqual(log.counts.dataError, 0)
|
|
2835
|
+
})
|
|
2700
2836
|
})
|
|
2701
2837
|
|
|
2702
2838
|
suite('throw errors from event handlers:', () => {
|
|
@@ -2764,6 +2900,10 @@ suite('walk:', () => {
|
|
|
2764
2900
|
test('end event occurred once', () => {
|
|
2765
2901
|
assert.strictEqual(log.counts.end, 1)
|
|
2766
2902
|
})
|
|
2903
|
+
|
|
2904
|
+
test('dataError event did not occur', () => {
|
|
2905
|
+
assert.strictEqual(log.counts.dataError, 0)
|
|
2906
|
+
})
|
|
2767
2907
|
})
|
|
2768
2908
|
|
|
2769
2909
|
suite('error occurs on stream:', () => {
|
|
@@ -2803,6 +2943,10 @@ suite('walk:', () => {
|
|
|
2803
2943
|
test('end event occurred once', () => {
|
|
2804
2944
|
assert.strictEqual(log.counts.end, 1)
|
|
2805
2945
|
})
|
|
2946
|
+
|
|
2947
|
+
test('dataError event did not occur', () => {
|
|
2948
|
+
assert.strictEqual(log.counts.dataError, 0)
|
|
2949
|
+
})
|
|
2806
2950
|
})
|
|
2807
2951
|
|
|
2808
2952
|
suite('two values separated by newline:', () => {
|
|
@@ -2839,8 +2983,8 @@ suite('walk:', () => {
|
|
|
2839
2983
|
assert.strictEqual(log.counts.string, 1)
|
|
2840
2984
|
})
|
|
2841
2985
|
|
|
2842
|
-
test('
|
|
2843
|
-
assert.strictEqual(log.counts.
|
|
2986
|
+
test('dataError event occurred once', () => {
|
|
2987
|
+
assert.strictEqual(log.counts.dataError, 1)
|
|
2844
2988
|
})
|
|
2845
2989
|
|
|
2846
2990
|
test('end event occurred once', () => {
|
|
@@ -2897,6 +3041,10 @@ suite('walk:', () => {
|
|
|
2897
3041
|
test('error event did not occur', () => {
|
|
2898
3042
|
assert.strictEqual(log.counts.error, 0)
|
|
2899
3043
|
})
|
|
3044
|
+
|
|
3045
|
+
test('dataError event did not occur', () => {
|
|
3046
|
+
assert.strictEqual(log.counts.dataError, 0)
|
|
3047
|
+
})
|
|
2900
3048
|
})
|
|
2901
3049
|
|
|
2902
3050
|
suite('two values separated by newline, ndjson=true, with embedded newlines in a value:', () => {
|
|
@@ -2944,6 +3092,10 @@ suite('walk:', () => {
|
|
|
2944
3092
|
test('error event did not occur', () => {
|
|
2945
3093
|
assert.strictEqual(log.counts.error, 0)
|
|
2946
3094
|
})
|
|
3095
|
+
|
|
3096
|
+
test('dataError event did not occur', () => {
|
|
3097
|
+
assert.strictEqual(log.counts.dataError, 0)
|
|
3098
|
+
})
|
|
2947
3099
|
})
|
|
2948
3100
|
|
|
2949
3101
|
suite('two values not separated by newline, ndjson=true:', () => {
|
|
@@ -2980,8 +3132,8 @@ suite('walk:', () => {
|
|
|
2980
3132
|
assert.strictEqual(log.counts.end, 1)
|
|
2981
3133
|
})
|
|
2982
3134
|
|
|
2983
|
-
test('
|
|
2984
|
-
assert.strictEqual(log.counts.
|
|
3135
|
+
test('dataError event occurred five times', () => {
|
|
3136
|
+
assert.strictEqual(log.counts.dataError, 5)
|
|
2985
3137
|
})
|
|
2986
3138
|
|
|
2987
3139
|
test('string event did not occurr', () => {
|
|
@@ -3038,6 +3190,10 @@ suite('walk:', () => {
|
|
|
3038
3190
|
test('error event did not occur', () => {
|
|
3039
3191
|
assert.strictEqual(log.counts.error, 0)
|
|
3040
3192
|
})
|
|
3193
|
+
|
|
3194
|
+
test('dataError event did not occur', () => {
|
|
3195
|
+
assert.strictEqual(log.counts.dataError, 0)
|
|
3196
|
+
})
|
|
3041
3197
|
})
|
|
3042
3198
|
|
|
3043
3199
|
suite('chunked ndjson:', () => {
|
|
@@ -3091,6 +3247,10 @@ suite('walk:', () => {
|
|
|
3091
3247
|
test('error event did not occur', () => {
|
|
3092
3248
|
assert.strictEqual(log.counts.error, 0)
|
|
3093
3249
|
})
|
|
3250
|
+
|
|
3251
|
+
test('dataError event did not occur', () => {
|
|
3252
|
+
assert.strictEqual(log.counts.dataError, 0)
|
|
3253
|
+
})
|
|
3094
3254
|
})
|
|
3095
3255
|
})
|
|
3096
3256
|
})
|