Skip to content

test[utils]: Add flowkey test#63

Open
Satyam0000000 wants to merge 1 commit into
bug0inc:mainfrom
Satyam0000000:test/flowkey-test-coverage
Open

test[utils]: Add flowkey test#63
Satyam0000000 wants to merge 1 commit into
bug0inc:mainfrom
Satyam0000000:test/flowkey-test-coverage

Conversation

@Satyam0000000

Copy link
Copy Markdown

Add missing test coverage for flowKey secret path

Files Changed

File Change
src/__tests__/utils.test.ts Added 3 new test cases

No changes to source files — this is test-only.


Tests Added (src/__tests__/utils.test.ts)

it("returns the same key for the same flow and secret", () => {
  const a = flowKey("my-flow", { secret: "s3cret" });
  const b = flowKey("my-flow", { secret: "s3cret" });
  expect(a).toBe(b);
});

it("returns different keys for different secrets", () => {
  const a = flowKey("my-flow", { secret: "secret1" });
  const b = flowKey("my-flow", { secret: "secret2" });
  expect(a).not.toBe(b);
});

it("produces different keys for same secret but different flows", () => {
  const a = flowKey("flow-a", { secret: "s3cret" });
  const b = flowKey("flow-b", { secret: "s3cret" });
  expect(a).not.toBe(b);
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant