MCPcopy
hub / github.com/vitejs/vite / test

Function test

playground/css/lightningcss-plugins.js:40–52  ·  view source on GitHub ↗
(rule)

Source from the content-addressed store, hash-verified

38 Rule: {
39 unknown: {
40 test(rule) {
41 const location = rule.loc
42 const from = currentStyleSheetSources[location.source_index]
43 const pattern = normalizePath(
44 path.resolve(path.dirname(from), './glob-dep/**/*.css'),
45 )
46 const files = globSync(pattern, {
47 expandDirectories: false,
48 absolute: true,
49 })
50 addDependency({ type: 'glob', glob: pattern })
51 return files.flatMap((file) => obtainLightningCssAst(file).rules)
52 },
53 },
54 },
55 }

Callers 1

mainFunction · 0.90

Calls 3

normalizePathFunction · 0.90
obtainLightningCssAstFunction · 0.85
resolveMethod · 0.65

Tested by

no test coverage detected