diff --git a/test/node-api.cjs b/test/node-api.cjs
index 0b8c013..63be9ee 100644
--- a/test/node-api.cjs
+++ b/test/node-api.cjs
@@ -37,6 +37,37 @@ describe("parse", function () {
]);
});
+ it("multi-byte characters", function () {
+ let contentLength = "안녕하세요 세계".length;
+ let openLength = "".length;
+ let closeLength = "".length;
+ let output = p.parse("안녕하세요 세계");
+
+ expect(output).to.eql([
+ {
+ type: "expression",
+ tagName: "template",
+ contents: "안녕하세요 세계",
+ range: {
+ start: 0,
+ end: openLength + contentLength + closeLength,
+ },
+ contentRange: {
+ start: openLength,
+ end: openLength + contentLength,
+ },
+ startRange: {
+ end: openLength,
+ start: 0,
+ },
+ endRange: {
+ start: openLength + contentLength - 1,
+ end: openLength + contentLength + closeLength,
+ },
+ },
+ ]);
+ });
+
it("expression position", function () {
let output = p.parse("const tpl = Hello!");