# test.govlab/quality/core/resolvers/coverage.resolver.test.ts

> 15 lines of code and 0 definitions.

Tree: Codebase Testing
Language: typescript
Canonical: https://banes-lab.com/anatomy/testing#file-testing-test-govlab-quality-core-resolvers-coverage-resolver-test-ts
Source text: https://banes-lab.com/source/testing/test.govlab/quality/core/resolvers/coverage.resolver.test.ts.txt

Listed in [test.govlab/quality/core/resolvers](https://banes-lab.com/api/source/testing/test.govlab/quality/core/resolvers.md), after [test.govlab/quality/core/resolvers/canon.resolver.test.ts](https://banes-lab.com/source/testing/test.govlab/quality/core/resolvers/canon.resolver.test.ts.md) and before [test.govlab/quality/core/resolvers/layer.resolver.test.ts](https://banes-lab.com/source/testing/test.govlab/quality/core/resolvers/layer.resolver.test.ts.md).

## Contained in

- [test.govlab/quality/core/resolvers](https://banes-lab.com/anatomy/testing/folder-testing-test-govlab-quality-core-resolvers.md)

## Source

```typescript
import { expect, test } from "vitest";
import { ROOT } from "@ssot/paths/anchor";
import { join } from "node:path";
import { relativePath } from "@ssot/paths";
import { resolveScope } from "@govlab/quality/core/resolvers/coverage.resolver.ts";

const subject = join(ROOT, relativePath("govlab.quality"), "core", "matchers", "word.matcher.ts").split("\\").join("/");

test("resolveScope credits a construct that a centralized test names", () => {
    const scope = resolveScope(subject);
    expect(scope?.label.endsWith(relativePath("govlab.quality"))).toBe(true);
    expect(scope?.coversName("wordIncludes")).toBe(true);
    expect(scope?.coversName(["unnamed", "Construct", "Probe"].join(""))).toBe(false);
});

test("resolveScope answers null for a file with no package above it", () => {
    expect(resolveScope("/no/package/here.ts")).toBeNull();
});
```
