Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/freeCodeCamp/freeCodeCamp
/ ensureLeadingSlash
Function
ensureLeadingSlash
e2e/utils/request.ts:3–4 ·
view source on GitHub ↗
(endpoint: string)
Source
from the content-addressed store, hash-verified
1
import
{ APIRequestContext, expect } from
'@playwright/test'
;
2
3
const
ensureLeadingSlash = (endpoint: string) =>
4
endpoint[0] ===
'/'
? endpoint :
'/'
+ endpoint;
5
6
export
const
authedRequest =
async
({
7
request,
Callers
1
authedRequest
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected