aboutsummaryrefslogtreecommitdiff
path: root/test/js/node/path/path.test.js
diff options
context:
space:
mode:
authorGravatar Ai Hoshino <ambiguous404@gmail.com> 2023-08-04 03:34:41 +0800
committerGravatar GitHub <noreply@github.com> 2023-08-03 12:34:41 -0700
commit30dde625214daf60c8ee4d1a7d132bdb3a175f17 (patch)
treea66a9cd87c71ac7c6ab857b00b462174ebdc7735 /test/js/node/path/path.test.js
parent928816bef0945e9655c115767c719d6865ff138c (diff)
downloadbun-30dde625214daf60c8ee4d1a7d132bdb3a175f17.tar.gz
bun-30dde625214daf60c8ee4d1a7d132bdb3a175f17.tar.zst
bun-30dde625214daf60c8ee4d1a7d132bdb3a175f17.zip
Fix the string encoding in `path.extname`. (#3949)
Close: #3948
Diffstat (limited to 'test/js/node/path/path.test.js')
-rw-r--r--test/js/node/path/path.test.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/js/node/path/path.test.js b/test/js/node/path/path.test.js
index 567e837af..030a7443a 100644
--- a/test/js/node/path/path.test.js
+++ b/test/js/node/path/path.test.js
@@ -692,3 +692,8 @@ it("path.parse", () => {
test("path.format works for vite's example", () => {
expect(path.format({ root: "", dir: "", name: "index", base: undefined, ext: ".css" })).toBe("index.css");
});
+
+it("path.extname", () => {
+ expect(path.extname("index.js")).toBe(".js");
+ expect(path.extname("make_plot.🔥")).toBe(".🔥");
+});