Skip to content
This repository was archived by the owner on Jan 19, 2025. It is now read-only.

Commit

Permalink
test(configuration): cover buildConfigurationRules
Browse files Browse the repository at this point in the history
  • Loading branch information
louisgrasset committed Nov 25, 2023
1 parent 9bbe886 commit 1ab1c29
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/configuration/__tests__/build-configuration-rules.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { buildConfigurationRules } from "../build-configuration-rules.js";

jest.mock("../../constants.js", () => ({
BLUESKY_IDENTIFIER: "username",
BLUESKY_INSTANCE: "bsky.social",
BLUESKY_PASSWORD: "app-password",
MASTODON_ACCESS_TOKEN: "access-token",
MASTODON_INSTANCE: "mastodon.social",
SYNC_BLUESKY: true,
SYNC_MASTODON: true,
TWITTER_HANDLE: "username",
}));

describe("buildConfigurationRules", () => {
it("should return an array of configuration rules", () => {
const result = buildConfigurationRules();
expect(result).toBeDefined();
expect(result).toBeInstanceOf(Array);
expect(result).toHaveLength(6);
});
});

0 comments on commit 1ab1c29

Please sign in to comment.