# test.build/core/resolvers/page.resolver.test.ts

> 10 lines of code and 0 definitions.

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

Listed in [test.build/core/resolvers](https://banes-lab.com/api/source/testing/test.build/core/resolvers.md), after [test.build/core/resolvers/ontology.resolver.test.ts](https://banes-lab.com/source/testing/test.build/core/resolvers/ontology.resolver.test.ts.md) and before [test.build/core/resolvers/payload.resolver.test.ts](https://banes-lab.com/source/testing/test.build/core/resolvers/payload.resolver.test.ts.md).

## Contained in

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

## Source

```typescript
import { describe, expect, it } from "vitest";
import { fileForPath, jsonFileOf } from "@banes-lab/build-scripts/core/resolvers/page.resolver.ts";

describe("fileForPath and jsonFileOf", () => {
    it("names the page file of a route and the payload file of a page or tab", () => {
        expect(fileForPath("/")).toBe("index.html");
        expect(fileForPath("/terms/guide")).toBe("terms/guide.html");
        expect(jsonFileOf("terms", null)).toBe("json/terms.json");
        expect(jsonFileOf("terms", "guide")).toBe("json/terms/guide.json");
    });
});
```
