# test.govlab/patterns/core/converters/code.converter.test.ts

> 9 lines of code and 0 definitions.

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

Listed in [test.govlab/patterns/core/converters](https://banes-lab.com/api/source/testing/test.govlab/patterns/core/converters.md), before [test.govlab/patterns/core/converters/definition.converter.test.ts](https://banes-lab.com/source/testing/test.govlab/patterns/core/converters/definition.converter.test.ts.md).

## Contained in

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

## Source

```typescript
import { describe, expect, it } from "vitest";
import { bodyHash } from "@govlab/patterns/core/converters/code.converter.ts";

describe("bodyHash", () => {
    it("hashes bodies equal under whitespace alike and different bodies apart", () => {
        expect(bodyHash("a  b\n\tc")).toBe(bodyHash("a b c"));
        expect(bodyHash("  a b")).toBe(bodyHash("a b"));
        expect(bodyHash("a b")).not.toBe(bodyHash("a c"));
    });
});
```
