Skip to content

Commit

Permalink
Merge branch 'fix/remove-billing-word' of https://github.com/12deg/ge…
Browse files Browse the repository at this point in the history
…nerator-library into fix/test
  • Loading branch information
dipendraupreti committed Aug 21, 2024
2 parents 82f47a7 + 0797b4b commit 17b1a6b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions generators/fastify-plugin/templates/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ pnpm add --filter "@scope/project" @<%= scope %>/<%= name %>
Register the plugin with your fastify instance in `src/index.ts`:

```typescript
import <%= baseName %>Plugin from "@<%= scope %>/<%= name %>";
import plugin from "@<%= scope %>/<%= name %>";
import Fastify from "fastify";

const start = async () => {
const fastify = await Fastify();

// Register <%= name %> plugin
await fastify.register(<%= baseName %>Plugin);
await fastify.register(plugin);

try {
await fastify.listen({
Expand Down
6 changes: 3 additions & 3 deletions generators/fastify-plugin/templates/__test__/plugin.test.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import Fastify from "fastify";
import { describe, it, expect } from "vitest";

import <%= baseName %>Plugin from "../src/index";
import plugin from "../src/index";

describe("<%= baseName %> plugin", () => {
describe("plugin", () => {
it("should be exported as default and register without issues", async () => {
const fastify = Fastify();

await expect(fastify.register(<%= baseName %>Plugin)).resolves.not.toThrow();
await expect(fastify.register(plugin)).resolves.not.toThrow();
});
});

0 comments on commit 17b1a6b

Please sign in to comment.