Skip to content

Commit

Permalink
chore: remove unused vars
Browse files Browse the repository at this point in the history
  • Loading branch information
psibean committed Dec 16, 2023
1 parent 48833b1 commit 25aba3c
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/tests/doublecsrf.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,32 +130,27 @@ describe("csrf-csrf token-rotation", () => {
"should generate tokens correctly, simulating token rotations",
() => {
const getEmptyResponse = () => {
const { mockResponse, mockRequest } = generateMocks();
const { mockResponse } = generateMocks();
return mockResponse;
};

const {
validateRequest: validateRequestWithSecret1,
generateToken: generateTokenWithSecret1,
} = generateMocksWithMultipleSecrets(SECRET1);

const {
validateRequest: validateRequestWithSecret2,
generateToken: generateTokenWithSecret2,
} = generateMocksWithMultipleSecrets(SECRET2);

const {
validateRequest: validateRequestWithSecret1And2,
generateToken: generateTokenWithSecret1And2,
} = generateMocksWithMultipleSecrets([SECRET1, SECRET2]);

const {
validateRequest: validateRequestWithSecret2And1,
generateToken: generateTokenWithSecret2And1,
} = generateMocksWithMultipleSecrets([SECRET2, SECRET1]);

it("should reuse existing token on request with SECRET1, while current is [SECRET1, SECRET2]", () => {
//
const { mockRequest } = generateMocksWithMultipleSecrets(SECRET1);
const mockResponse = getEmptyResponse();

Expand Down

0 comments on commit 25aba3c

Please sign in to comment.