1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-03-17 20:48:11 +02:00
joplin/packages/fork-htmlparser2/src/WritableStream.spec.ts
2020-11-05 16:58:23 +00:00

15 lines
414 B
TypeScript

import { WritableStream } from "./WritableStream";
describe("WritableStream", () => {
test("should decode fragmented unicode characters", () => {
const ontext = jest.fn();
const stream = new WritableStream({ ontext });
stream.write(Buffer.from([0xe2, 0x82]));
stream.write(Buffer.from([0xac]));
stream.end();
expect(ontext).toBeCalledWith("€");
});
});