Skip to content

Commit

Permalink
revert: test timeout mocha and jest typing issues
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigopavezi committed Nov 5, 2024
1 parent cc02a64 commit e5cc0cf
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 1,789 deletions.
4 changes: 2 additions & 2 deletions packages/integration-test/test/node-client.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ describe('Request client using a request node', () => {
requestData1 = requests[0].getData();
expect(requestData1.state).toBe(Types.RequestLogic.STATE.CANCELED);
expect(requestData1.expectedAmount).toBe('90000000');
});
}, 20000);

it('can create requests and get them fromIdentity with smart contract identity', async () => {
const payerSmartContract = {
Expand Down Expand Up @@ -474,7 +474,7 @@ describe('Request client using a request node', () => {

await fetchedRequest.refresh();
expect(fetchedRequest.getData().expectedAmount).toBe('0');
});
}, 60000);

it('create an encrypted and unencrypted request with the same content', async () => {
const requestNetwork = new RequestNetwork({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ describe('ERC20 Fee Proxy detection test-suite (with a TheGraph Retriever)', ()
expect(balance.events[0].name).toBe('payment');
expect(balance.events[0].amount).toBe('1');
expect(Math.abs(declarationTimestamp - (balance.events[0].timestamp ?? 0))).toBeLessThan(5);
});
}, 15000);

it('getBalance = 0 if the payer declared the payment', async () => {
// Create a request
Expand Down Expand Up @@ -151,5 +151,5 @@ describe('ERC20 Fee Proxy detection test-suite (with a TheGraph Retriever)', ()
const balance = await erc20FeeProxy.getBalance(updatedRequest);
expect(balance.balance).toBe('0');
expect(balance.events).toHaveLength(0);
});
}, 15000);
});
4 changes: 2 additions & 2 deletions packages/integration-test/test/scheduled/erc20-proxy.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ describe('ERC20 Proxy detection test-suite', () => {
expect(balance.events[0].name).toBe('payment');
expect(balance.events[0].amount).toBe('1');
expect(Math.abs(declarationTimestamp - (balance.events[0].timestamp ?? 0))).toBeLessThan(5);
});
}, 10000);

it('getBalance = 0 if the payer declared the payment', async () => {
// Create a request
Expand Down Expand Up @@ -80,5 +80,5 @@ describe('ERC20 Proxy detection test-suite', () => {
});
expect(balance.balance).toBe('0');
expect(balance.events).toHaveLength(0);
});
}, 10000);
});
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ describe('ERC20 with Escrow detection test-suite', () => {
const balance = await feeProxyDetector.getBalance(mockRequest);

expect(balance.balance).toBe('1000000000000000000');
});
}, 15000);

it('can getBalance on a rinkeby request', async () => {
const mockRequest = createMockErc20FeeRequest({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ describe('ETH Fee proxy detection test-suite', () => {
expect(balance.events[0].name).toBe('payment');
expect(balance.events[0].amount).toBe('50000000000000000');
expect(Math.abs(declarationTimestamp - (balance.events[0].timestamp ?? 0))).toBeLessThan(5);
});
}, 20000);

it('getBalance = 0 if the payer declared the payment', async () => {
// Create a request
Expand Down
7 changes: 6 additions & 1 deletion packages/integration-test/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
"extends": "../../tsconfig",
"include": ["test/"]
"include": ["test/"],
"compilerOptions": {
// workaround to fix conflict between `@types/mocha` and `@types/jest`
// https://github.com/microsoft/TypeScript/issues/11437#issuecomment-252381205
"typeRoots": ["../../types-overrides", "node_modules/@types"]
}
}
Loading

0 comments on commit e5cc0cf

Please sign in to comment.