File size: 363 Bytes
7c5b7bd
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
const { assert } = require("chai");

const { decode, encode } = require("../lib");

describe("UTF8", () => {
  it("should f-1(f(x)) = x", () => {
    assert.equal(decode(encode("foo")), "foo");
    assert.equal(decode(encode("éé")), "éé");

    // TODO(sven): utf8 encoder fails here
    // assert.equal(decode(encode("🤣见見")), "🤣见見");
  });
});