[node] Export Buffer and SlowBuffer from "buffer" module.

This commit is contained in:
John Vilk
2016-02-04 19:40:44 -05:00
parent e69fe60f2d
commit aee0039a2d
2 changed files with 13 additions and 0 deletions
+10
View File
@@ -16,6 +16,8 @@ import * as path from "path";
import * as readline from "readline";
import * as childProcess from "child_process";
import * as os from "os";
// Specifically test buffer module regression.
import {Buffer as ImportedBuffer, SlowBuffer as ImportedSlowBuffer} from "buffer";
assert(1 + 1 - 2 === 0, "The universe isn't how it should.");
@@ -169,6 +171,14 @@ function bufferTests() {
index = buffer.indexOf(23);
index = buffer.indexOf(buffer);
}
// Imported Buffer from buffer module works properly
{
let b = new ImportedBuffer('123');
b.writeUInt8(0, 6);
let sb = new ImportedSlowBuffer(43);
b.writeUInt8(0, 6);
}
}