index.js 363 B

12345678910111213
  1. const { assert } = require("chai");
  2. const { decode, encode } = require("../lib");
  3. describe("UTF8", () => {
  4. it("should f-1(f(x)) = x", () => {
  5. assert.equal(decode(encode("foo")), "foo");
  6. assert.equal(decode(encode("éé")), "éé");
  7. // TODO(sven): utf8 encoder fails here
  8. // assert.equal(decode(encode("🤣见見")), "🤣见見");
  9. });
  10. });