MCPcopy Index your code
hub / github.com/NativeScript/NativeScript / setImageName

Function setImageName

apps/ui/e2e/helpers/image-helper.ts:2–14  ·  view source on GitHub ↗
(suite: string, spec: string, testsName: string)

Source from the content-addressed store, hash-verified

1
2export const setImageName = (suite: string, spec: string, testsName: string) => {
3 let testName = testsName
4 .replace(suite, "")
5 .replace(spec, "");
6 testName = `${suite}-${spec}-${testName}`
7 .replace("should", "-")
8 .replace(/\s+/g, "-")
9 .replace(/\_+/ig, "_")
10 .replace(/[!$%^&*()+|~=`{}\[\]:";'<>?,.\/]/g, "")
11 .replace(/\-+/g, "-");
12
13 return testName;
14};

Calls 1

replaceMethod · 0.80

Tested by

no test coverage detected