Skip to content
This repository has been archived by the owner on Oct 7, 2024. It is now read-only.

Commit

Permalink
chore: rename variables in unit tests (#58)
Browse files Browse the repository at this point in the history
chore: rename variables
  • Loading branch information
danroc authored Jul 28, 2023
1 parent 57d2ffd commit ce5d374
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/KeyringClient.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,13 @@ describe('KeyringClient', () => {
];

mockSender.send.mockResolvedValue(expectedResponse);
const requests = await keyring.listRequests();
const response = await keyring.listRequests();
expect(mockSender.send).toHaveBeenCalledWith({
jsonrpc: '2.0',
id: expect.any(String),
method: 'keyring_listRequests',
});
expect(requests).toStrictEqual(expectedResponse);
expect(response).toStrictEqual(expectedResponse);
});
});

Expand All @@ -183,14 +183,14 @@ describe('KeyringClient', () => {
};

mockSender.send.mockResolvedValue(expectedResponse);
const request = await keyring.getRequest(id);
const response = await keyring.getRequest(id);
expect(mockSender.send).toHaveBeenCalledWith({
jsonrpc: '2.0',
id: expect.any(String),
method: 'keyring_getRequest',
params: { id },
});
expect(request).toStrictEqual(expectedResponse);
expect(response).toStrictEqual(expectedResponse);
});
});

Expand Down Expand Up @@ -227,14 +227,14 @@ describe('KeyringClient', () => {
const id = '71621d8d-62a4-4bf4-97cc-fb8f243679b0';

mockSender.send.mockResolvedValue(null);
const request = await keyring.approveRequest(id);
const response = await keyring.approveRequest(id);
expect(mockSender.send).toHaveBeenCalledWith({
jsonrpc: '2.0',
id: expect.any(String),
method: 'keyring_approveRequest',
params: { id },
});
expect(request).toBeUndefined();
expect(response).toBeUndefined();
});
});

Expand All @@ -243,14 +243,14 @@ describe('KeyringClient', () => {
const id = '71621d8d-62a4-4bf4-97cc-fb8f243679b0';

mockSender.send.mockResolvedValue(null);
const request = await keyring.rejectRequest(id);
const response = await keyring.rejectRequest(id);
expect(mockSender.send).toHaveBeenCalledWith({
jsonrpc: '2.0',
id: expect.any(String),
method: 'keyring_rejectRequest',
params: { id },
});
expect(request).toBeUndefined();
expect(response).toBeUndefined();
});
});
});

0 comments on commit ce5d374

Please sign in to comment.