# test.govlab/quality/core/converters/surface.converter.test.ts

> 8 lines of code and 0 definitions.

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

Listed in [test.govlab/quality/core/converters](https://banes-lab.com/api/source/testing/test.govlab/quality/core/converters.md), after [test.govlab/quality/core/converters/stylelint.converter.test.ts](https://banes-lab.com/source/testing/test.govlab/quality/core/converters/stylelint.converter.test.ts.md) and before [test.govlab/quality/core/converters/target.converter.test.ts](https://banes-lab.com/source/testing/test.govlab/quality/core/converters/target.converter.test.ts.md).

## Contained in

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

## Source

```typescript
import { expect, test } from "vitest";
import { mergeOwnership } from "@govlab/quality/core/converters/surface.converter.ts";

const SURFACES = [{ fixedOwners: ["go"], id: "format", ownerByLanguage: { go: "gofmt", ts: "prettier" } }];

test("mergeOwnership applies an override except where the surface's owner is fixed", () => {
    expect(mergeOwnership(SURFACES)).toBe(SURFACES);
    const [merged] = mergeOwnership(SURFACES, { format: { go: "other", ts: "biome" } });
    expect(merged?.ownerByLanguage).toStrictEqual({ go: "gofmt", ts: "biome" });
});
```
