MCPcopy Index your code
hub / github.com/ionic-team/ionic-framework / generateTitle

Function generateTitle

core/src/utils/test/playwright/generator.ts:40–54  ·  view source on GitHub ↗
(title: string, config: TestConfig)

Source from the content-addressed store, hash-verified

38 * each test title is unique.
39 */
40const generateTitle = (title: string, config: TestConfig): string => {
41 const { mode, direction, palette } = config;
42
43 if (palette === 'light') {
44 /**
45 * Ionic has many existing tests that existed prior to
46 * the introduction of palette testing. To maintain backwards
47 * compatibility, we will not include the palette in the test
48 * title if the palette is set to light.
49 */
50 return `${title} - ${mode}/${direction}`;
51 }
52
53 return `${title} - ${mode}/${direction}/${palette}`;
54};
55
56/**
57 * Generates a unique filename based on a base filename

Callers 1

configsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected