Skip to content

Commit

Permalink
clean up sinon after tests
Browse files Browse the repository at this point in the history
  • Loading branch information
LiranCohen committed Apr 12, 2024
1 parent f0c3b32 commit b2116ea
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/agent/tests/rpc-client.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ describe('RPC Clients', () => {
client = new HttpDwnRpcClient();
});

after(() => {
sinon.restore();
});

it('should retrieve subsequent result from cache', async () => {
// we spy on fetch to see how many times it is called
const fetchSpy = sinon.spy(globalThis, 'fetch');
Expand Down Expand Up @@ -55,6 +59,10 @@ describe('RPC Clients', () => {
describe('Web5RpcClient', () => {
let client: Web5RpcClient;

after(() => {
sinon.restore();
});

beforeEach(async () => {
sinon.restore();
client = new Web5RpcClient();
Expand Down

0 comments on commit b2116ea

Please sign in to comment.