MCPcopy 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

1import { APIRequestContext, expect } from '@playwright/test';
2
3const ensureLeadingSlash = (endpoint: string) =>
4 endpoint[0] === '/' ? endpoint : '/' + endpoint;
5
6export const authedRequest = async ({
7 request,

Callers 1

authedRequestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected