Skip to content

Commit 0452199

Browse files
committed
release v1.1.2
1 parent c8ec437 commit 0452199

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "next-http-proxy-middleware",
3-
"version": "1.1.1",
3+
"version": "1.1.2",
44
"description": "Nextjs HTTP Proxy Middleware",
55
"main": "build/index.js",
66
"scripts": {

src/index.test.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,19 @@ describe("Test `rewritePath` functionn ", () => {
2727
replaceStr: "/auth"
2828
}]));
2929
});
30+
31+
test("Issue(#45) test", () => {
32+
const originUrl = "/test/api/graphql";
33+
expect("/test").toEqual(rewritePath(originUrl, {
34+
"/api/graphql": "",
35+
}));
36+
});
37+
38+
test("Issue(#45) test", () => {
39+
const originUrl = "https://naver.com/test/api/graphql";
40+
expect("https://naver.com/test/api/graphql").toEqual(rewritePath(originUrl, [{
41+
patternStr: "/api/graphql",
42+
replaceStr: ""
43+
}]));
44+
});
3045
});

0 commit comments

Comments
 (0)