add dish translation tests for node

This commit is contained in:
d98762625 2019-04-29 17:09:01 +01:00
parent aeb08caf77
commit 65a3897f87
7 changed files with 147 additions and 24 deletions

View file

@ -1039,8 +1039,7 @@ class Utils {
if (!Utils.isNode()) {
throw new TypeError("Browser environment cannot support readFileSync");
}
// Resist using node's Buffer.buffer here - this yields a 8192 length byteArray
// regardless of the length of the buffer.
const arrayBuffer = Uint8Array.from(file.data);
return arrayBuffer.buffer;
}