MCPcopy Create free account
hub / github.com/vale-cli/vale / mockPath

Function mockPath

cmd/vale/pkg_test.go:15–28  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

13var TestData = "../../testdata/pkg"
14
15func mockPath() (string, error) {
16 cfg, err := core.NewConfig(&core.CLIFlags{})
17 if err != nil {
18 return "", err
19 }
20 cfg.AddStylesPath(os.TempDir())
21
22 err = initPath(cfg)
23 if err != nil {
24 return "", err
25 }
26
27 return cfg.StylesPath(), nil
28}
29
30func TestNoPkgFound(t *testing.T) {
31 path, err := mockPath()

Callers 7

TestNoPkgFoundFunction · 0.85
TestLibraryFunction · 0.85
TestLocalZipFunction · 0.85
TestLocalDirFunction · 0.85
TestLocalCompleteFunction · 0.85
TestLocalOnlyStylesFunction · 0.85
TestV3PkgFunction · 0.85

Calls 4

AddStylesPathMethod · 0.95
StylesPathMethod · 0.95
NewConfigFunction · 0.92
initPathFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…