Fix nodejs StringDecoder definition (#10100)

This commit is contained in:
Vincent Rouille
2016-07-20 02:05:08 +02:00
committed by Mohamed Hegazy
parent d726a1348e
commit b54fdb6595
9 changed files with 69 additions and 12 deletions

View File

@@ -19,6 +19,8 @@ import * as childProcess from "child_process";
import * as cluster from "cluster";
import * as os from "os";
import * as vm from "vm";
import * as string_decoder from "string_decoder";
// Specifically test buffer module regression.
import {Buffer as ImportedBuffer, SlowBuffer as ImportedSlowBuffer} from "buffer";
@@ -699,6 +701,18 @@ namespace readline_tests {
}
}
////////////////////////////////////////////////////
/// string_decoder tests : https://nodejs.org/api/string_decoder.html
////////////////////////////////////////////////////
namespace string_decoder_tests {
const StringDecoder = string_decoder.StringDecoder;
const buffer = new Buffer('test');
const decoder = new StringDecoder('utf8');
const part: string = decoder.write(new Buffer('test'));
const end: string = decoder.end();
}
//////////////////////////////////////////////////////////////////////
/// Child Process tests: https://nodejs.org/api/child_process.html ///
//////////////////////////////////////////////////////////////////////