# test.govlab/patterns/core/resolvers/math.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-patterns-core-resolvers-math-resolver-test-ts
Source text: https://banes-lab.com/source/testing/test.govlab/patterns/core/resolvers/math.resolver.test.ts.txt

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

## Contained in

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

## Source

```typescript
import { describe, expect, it } from "vitest";
import { ANALYSIS_AXIS } from "@govlab/patterns/configuration/generated/axis.generated.ts";
import { isMathType } from "@govlab/patterns/core/predicates/math.predicate.ts";
import { mathTypeOf } from "@govlab/patterns/core/resolvers/math.resolver.ts";

describe("mathTypeOf", () => {
    it("maps representative analysis tags to their math type", () => {
        expect(mathTypeOf("statistical")).toBe("probability");
        expect(mathTypeOf("relation")).toBe("graph");
        expect(mathTypeOf("time")).toBe("dynamical-systems");
        expect(mathTypeOf("structure")).toBe("algebra");
    });

    it("gives every analysis tag a declared math type, with no silent default", () => {
        expect(ANALYSIS_AXIS.every((tag) => isMathType(mathTypeOf(tag)))).toBe(true);
    });
});
```
