• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

visgl / luma.gl / 23384903092

21 Mar 2026 05:30PM UTC coverage: 72.417% (+9.3%) from 63.136%
23384903092

push

github

web-flow
feat(devtool); Enable LLMs to automatically test website, package for devtools upstream (#2557)

4103 of 6350 branches covered (64.61%)

Branch coverage included in aggregate %.

215 of 271 new or added lines in 13 files covered. (79.34%)

45 existing lines in 6 files now uncovered.

9124 of 11915 relevant lines covered (76.58%)

277.34 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

77.05
/dev-modules/devtools-extensions/playwright/resolve-example-url.mjs
1
const DEFAULT_BASE_URL = 'http://127.0.0.1:3000';
1✔
2
const DEFAULT_EXAMPLE_BASE_PATH = '/examples';
1✔
3
const DEFAULT_EXAMPLE_PATH = '/examples/showcase/persistence';
1✔
4

5
function getPlaywrightConfig(ocularConfig = {}) {
3✔
6
  return ocularConfig.devtools?.playwright || {};
3!
7
}
8

9
function normalizeExamplePath(value) {
10
  if (!value) {
1!
NEW
11
    return DEFAULT_EXAMPLE_PATH;
×
12
  }
13

14
  return value.startsWith('/') ? value : `/${value}`;
1!
15
}
16

17
export function resolveExamplePath(example, ocularConfig = {}) {
3✔
18
  const playwrightConfig = getPlaywrightConfig(ocularConfig);
3✔
19
  const defaultExamplePath = playwrightConfig.defaultExamplePath || DEFAULT_EXAMPLE_PATH;
3✔
20
  const exampleBasePath = playwrightConfig.exampleBasePath || DEFAULT_EXAMPLE_BASE_PATH;
3✔
21
  const configuredExamples = playwrightConfig.examples || {};
3✔
22

23
  if (!example) {
3!
NEW
24
    return defaultExamplePath;
×
25
  }
26

27
  const aliasedPath = configuredExamples[example] || configuredExamples[example.toLowerCase()];
3✔
28
  if (aliasedPath) {
3✔
29
    return normalizeExamplePath(aliasedPath);
1✔
30
  }
31

32
  if (example.startsWith('http://') || example.startsWith('https://')) {
2!
NEW
33
    return example;
×
34
  }
35

36
  if (example.startsWith('/')) {
2!
NEW
37
    return example;
×
38
  }
39

40
  if (example.startsWith('examples/')) {
2!
NEW
41
    return normalizeExamplePath(example);
×
42
  }
43

44
  return `${exampleBasePath}/${example}`;
2✔
45
}
46

47
export function resolveExampleUrl(example, baseUrl = DEFAULT_BASE_URL, ocularConfig = {}) {
2✔
48
  const resolvedExamplePath = resolveExamplePath(example, ocularConfig);
1✔
49

50
  if (resolvedExamplePath.startsWith('http://') || resolvedExamplePath.startsWith('https://')) {
1!
NEW
51
    return resolvedExamplePath;
×
52
  }
53

54
  return new URL(resolvedExamplePath, baseUrl).toString();
1✔
55
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc