# test.deploy/core/converters/failure.converter.test.ts

> 10 lines of code and 0 definitions.

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

Listed in [test.deploy/core/converters](https://banes-lab.com/api/source/testing/test.deploy/core/converters.md), after [test.deploy/core/converters/catalog.converter.test.ts](https://banes-lab.com/source/testing/test.deploy/core/converters/catalog.converter.test.ts.md) and before [test.deploy/core/converters/index.converter.test.ts](https://banes-lab.com/source/testing/test.deploy/core/converters/index.converter.test.ts.md).

## Contained in

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

## Source

```typescript
import { describe, expect, it } from "vitest";
import { messageOf } from "@banes-lab/deploy/core/converters/failure.converter.ts";

describe("messageOf", () => {
    it("takes the message from an error", () => {
        expect(messageOf(new Error("boom"))).toBe("boom");
    });

    it("stringifies anything that is not an error", () => {
        expect(messageOf(42)).toBe("42");
    });
});
```
