File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -20,18 +20,18 @@ describe('FormatStream', function() {
20
20
21
21
it ( 'should format objects' , function ( done ) {
22
22
var stream = new FormatStream ( { objectMode : true } ) ;
23
- stream . setEncoding ( 'utf8' ) ;
23
+ // stream.setEncoding('utf8');
24
24
var source = {
25
25
results : [
26
26
{
27
27
alternatives : [
28
28
{
29
29
confidence : 0.881 ,
30
- transcript : 'foo bar ' ,
31
- final : true
30
+ transcript : 'foo bar '
32
31
}
33
32
] ,
34
- result_index : 0
33
+ result_index : 0 ,
34
+ final : true
35
35
}
36
36
]
37
37
} ;
@@ -41,16 +41,18 @@ describe('FormatStream', function() {
41
41
alternatives : [
42
42
{
43
43
confidence : 0.881 ,
44
- transcript : 'Foo bar. ' ,
45
- final : true
44
+ transcript : 'Foo bar. '
46
45
}
47
46
] ,
48
- result_index : 0
47
+ result_index : 0 ,
48
+ final : true
49
49
}
50
50
]
51
51
} ;
52
52
stream . on ( 'data' , function ( actual ) {
53
- assert . equal ( actual , expected ) ;
53
+ console . log ( JSON . stringify ( actual , null , 2 ) )
54
+ console . log ( JSON . stringify ( expected , null , 2 ) )
55
+ assert . deepEqual ( actual , expected ) ;
54
56
done ( ) ;
55
57
} ) ;
56
58
stream . on ( 'error' , done ) ;
You can’t perform that action at this time.
0 commit comments