Skip to content

Commit 50e63d1

Browse files
committed
fixing broken test
1 parent f20973d commit 50e63d1

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

test/format-stream-spec.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,18 @@ describe('FormatStream', function() {
2020

2121
it('should format objects', function(done) {
2222
var stream = new FormatStream({ objectMode: true });
23-
stream.setEncoding('utf8');
23+
//stream.setEncoding('utf8');
2424
var source = {
2525
results: [
2626
{
2727
alternatives: [
2828
{
2929
confidence: 0.881,
30-
transcript: 'foo bar ',
31-
final: true
30+
transcript: 'foo bar '
3231
}
3332
],
34-
result_index: 0
33+
result_index: 0,
34+
final: true
3535
}
3636
]
3737
};
@@ -41,16 +41,18 @@ describe('FormatStream', function() {
4141
alternatives: [
4242
{
4343
confidence: 0.881,
44-
transcript: 'Foo bar. ',
45-
final: true
44+
transcript: 'Foo bar. '
4645
}
4746
],
48-
result_index: 0
47+
result_index: 0,
48+
final: true
4949
}
5050
]
5151
};
5252
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);
5456
done();
5557
});
5658
stream.on('error', done);

0 commit comments

Comments
 (0)