We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7b2793a commit d552e76Copy full SHA for d552e76
test/helper.test.ts
@@ -0,0 +1,13 @@
1
+import { stripTrailingSlash } from '../src/lib/helpers'
2
+
3
+test('Strip trailing slash from URL', () => {
4
+ const URL = 'http://localhost:3000/'
5
+ const expectedURL = URL.slice(0, -1)
6
+ expect(stripTrailingSlash(URL)).toBe(expectedURL)
7
+})
8
9
+test('Return the original URL if there is no slash at the end', () => {
10
+ const URL = 'http://localhost:3000'
11
+ const expectedURL = URL
12
13
0 commit comments