# test.rules/shared/resolvers/location.resolver.test.ts

> 23 lines of code and 0 definitions.

Tree: Codebase Testing
Language: typescript
Canonical: https://banes-lab.com/anatomy/testing#file-testing-test-rules-shared-resolvers-location-resolver-test-ts
Source text: https://banes-lab.com/source/testing/test.rules/shared/resolvers/location.resolver.test.ts.txt

Listed in [test.rules/shared/resolvers](https://banes-lab.com/api/source/testing/test.rules/shared/resolvers.md), after [test.rules/shared/resolvers/anchor.resolver.test.ts](https://banes-lab.com/source/testing/test.rules/shared/resolvers/anchor.resolver.test.ts.md) and before [test.rules/shared/resolvers/scope.resolver.test.ts](https://banes-lab.com/source/testing/test.rules/shared/resolvers/scope.resolver.test.ts.md).

## Contained in

- [test.rules/shared/resolvers](https://banes-lab.com/anatomy/testing/folder-testing-test-rules-shared-resolvers.md)

## Source

```typescript
import {
    MEMBER_PATHS_CONFIGS,
    WRITE_GOVERNED_MEMBERS,
    governsOwnWrites,
} from "@ssot/govlab/shared/resolvers/location.resolver.ts";
import { describe, expect, it } from "vitest";
import { absolutePath } from "@ssot/paths";
import { sep } from "node:path";

const posix = function posix(path: string): string {
    return path.split(sep).join("/");
};

describe("the self-governed member declarations", () => {
    const coordination = posix(absolutePath("app.coordination"));

    it("read the paths config and the write gate each self-governed manifest names", () => {
        expect(MEMBER_PATHS_CONFIGS.has(`${coordination}/config/surface.config.ts`)).toBe(true);
        expect(WRITE_GOVERNED_MEMBERS).toContain(coordination);
    });

    it("leave write governance to the member only for files inside it", () => {
        expect(governsOwnWrites(`${coordination}/tools/core/runners/venue.runner.ts`)).toBe(true);
        const member = posix(absolutePath("app.member"));
        expect(governsOwnWrites(`${member}/core/registries/probe.registry.ts`)).toBe(false);
    });
});
```
