# test.build/core/plugins/site.plugin.test.ts

> 12 lines of code and 0 definitions.

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

Listed in [test.build/core/plugins](https://banes-lab.com/api/source/testing/test.build/core/plugins.md), after [test.build/core/plugins/server.plugin.test.ts](https://banes-lab.com/source/testing/test.build/core/plugins/server.plugin.test.ts.md).

## Contained in

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

## Source

```typescript
import { describe, expect, it } from "vitest";
import { sitePlugin } from "@banes-lab/build-scripts/core/plugins/site.plugin.ts";

describe("sitePlugin", () => {
    it("names itself and hooks the build start, the bundle close, the config and the dev server", () => {
        const plugin = sitePlugin({ attribute: "data-walk", orderOf: () => "" });
        expect(plugin.name).toBe("site");
        expect(plugin.buildStart).toBeDefined();
        expect(plugin.closeBundle).toBeDefined();
        expect(plugin.configResolved).toBeTypeOf("function");
        expect(plugin.configureServer).toBeTypeOf("function");
    });
});
```
