11import { retrace } from "../runner"
22import { RetraceResult } from "../types"
33
4- const DEFAULT_TIMEOUT = 10_000
4+ const DEFAULT_TIMEOUT = 100_000
5+ const DELAY_FOR_RATE_LIMIT = process . env [ "CI" ] === undefined ? 5000 : 10_000
56
67describe ( "transactions" , ( ) => {
78 it (
@@ -19,7 +20,7 @@ describe("transactions", () => {
1920 it (
2021 "should return correct information for simple transaction with exit code 0" ,
2122 async ( ) => {
22- await wait ( 5000 )
23+ await wait ( )
2324
2425 const txLink = "9432b11f810c58b38658cbc41c52dd01cf3af18e950d375dcc867077554e4550"
2526 const testnet = false
@@ -33,7 +34,7 @@ describe("transactions", () => {
3334 it (
3435 "should return correct information for transaction for code with single exotic library cell" ,
3536 async ( ) => {
36- await wait ( 5000 )
37+ await wait ( )
3738
3839 const txLink = "4295a2c06ca9b0242d4b6638e4eb1a8da91a9d75dbeae4acc13a4355a4dd7a6a"
3940 const testnet = false
@@ -47,7 +48,7 @@ describe("transactions", () => {
4748 it (
4849 "should return correct information for transaction for code with several exotic library cells" ,
4950 async ( ) => {
50- await wait ( 5000 )
51+ await wait ( )
5152
5253 const txLink = "440e0490bd5efee08b23cf33e2cfd9b8d414c4cb717d3f92727fa49d4c51a09d"
5354 const testnet = false
@@ -61,7 +62,7 @@ describe("transactions", () => {
6162 it (
6263 "should return correct information for transaction with external-in message for wallet v5 that retracer cannot fully recreate" ,
6364 async ( ) => {
64- await wait ( 5000 )
65+ await wait ( )
6566
6667 const txLink = "d6b814f76ec8cae17664ceba18b978e510f2249b36a35bf7227db121c1516e96"
6768 const testnet = false
@@ -76,7 +77,7 @@ describe("transactions", () => {
7677 it (
7778 "should return correct information for transaction with external-in message for wallet v4" ,
7879 async ( ) => {
79- await wait ( 5000 )
80+ await wait ( )
8081
8182 const txLink = "f8b7a5b598c65ecb180338eec103bf28c199bf8346453342eb7022ccf2ea39f6"
8283 const testnet = false
@@ -100,7 +101,7 @@ describe("transactions", () => {
100101 expect ( res . money ) . toMatchSnapshot ( )
101102 }
102103
103- async function wait ( delay : number ) : Promise < unknown > {
104- return new Promise ( resolve => setTimeout ( resolve , delay ) )
104+ async function wait ( ) : Promise < unknown > {
105+ return new Promise ( resolve => setTimeout ( resolve , DELAY_FOR_RATE_LIMIT ) )
105106 }
106107} )
0 commit comments