File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2974,7 +2974,6 @@ export class PgDataStore
29742974 const total = await client . query < { count : number } > ( `
29752975 SELECT block_count AS count FROM chain_tip
29762976 ` ) ;
2977- console . log ( 'printing total rows here: ' , total . rows ) ;
29782977 const results = await client . query < BlockQueryResult > (
29792978 `
29802979 SELECT ${ BLOCK_COLUMNS }
Original file line number Diff line number Diff line change @@ -4,6 +4,9 @@ import { StacksCoreRpcClient } from '../core-rpc/client';
44// ts-unused-exports:disable-next-line
55export default async ( ) : Promise < void > => {
66 console . log ( 'Jest - setup..' ) ;
7+ if ( ! process . env . NODE_ENV ) {
8+ process . env . NODE_ENV = 'test' ;
9+ }
710 loadDotEnv ( ) ;
811 console . log ( 'Waiting for RPC connection to core node..' ) ;
912 await new StacksCoreRpcClient ( ) . waitForConnection ( 60000 ) ;
Original file line number Diff line number Diff line change @@ -4,6 +4,9 @@ import { StacksCoreRpcClient } from '../core-rpc/client';
44// ts-unused-exports:disable-next-line
55export default async ( ) : Promise < void > => {
66 console . log ( 'Jest - setup..' ) ;
7+ if ( ! process . env . NODE_ENV ) {
8+ process . env . NODE_ENV = 'test' ;
9+ }
710 loadDotEnv ( ) ;
811 console . log ( 'Waiting for RPC connection to core node..' ) ;
912 await new StacksCoreRpcClient ( ) . waitForConnection ( 60000 ) ;
Original file line number Diff line number Diff line change @@ -2,6 +2,9 @@ import { loadDotEnv } from '../helpers';
22// ts-unused-exports:disable-next-line
33export default ( ) : void => {
44 console . log ( 'Jest - setup..' ) ;
5+ if ( ! process . env . NODE_ENV ) {
6+ process . env . NODE_ENV = 'test' ;
7+ }
58 loadDotEnv ( ) ;
69 console . log ( 'Jest - setup done' ) ;
710} ;
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ type TableCellValue = string | number | bigint | undefined;
2727 * @param blockHeight Specific block height at which to query balances
2828 */
2929async function printTopAccountBalances ( count : number , blockHeight : number ) {
30- const db = await PgDataStore . connect ( { skipMigrations : true , usageName : 'tests ' } ) ;
30+ const db = await PgDataStore . connect ( { skipMigrations : true , usageName : 'utils ' } ) ;
3131
3232 const heightText = blockHeight == 0 ? 'chain tip' : `block height ${ blockHeight } ` ;
3333 console . log ( `Calculating balances for top ${ count } accounts at ${ heightText } ...` ) ;
You can’t perform that action at this time.
0 commit comments