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

Commit

Permalink
Fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nagdahimanshu committed Oct 24, 2023
1 parent 75ecee9 commit 29aa64f
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions test/unit/utils/network.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,9 @@ describe('Test getNetworkIdentifier method', () => {
) as [string, NetworkConfigLocal])[0];

it('should return networkIdentifier when use-snapshot is true', async () => {
const useSnapshot = true;

/* eslint-disable-next-line global-require, @typescript-eslint/no-var-requires */
const { getNetworkIdentifier } = require('../../../src/utils/network');
const networkIdentifier = await getNetworkIdentifier(useSnapshot, network, './lisk/lisk-core');
const networkIdentifier = await getNetworkIdentifier(network, './lisk/lisk-core');
expect(networkIdentifier).toBe(mainnetNetworkIdentifier);
});

Expand All @@ -46,12 +44,11 @@ describe('Test getNetworkIdentifier method', () => {
},
}),
}));
const useSnapshot = false;

/* eslint-disable-next-line global-require, @typescript-eslint/no-var-requires */
const { getNetworkIdentifier } = require('../../../src/utils/network');

const networkIdentifier = await getNetworkIdentifier(useSnapshot, network, './lisk/lisk-core');
const networkIdentifier = await getNetworkIdentifier(null, './lisk/lisk-core');
expect(networkIdentifier).toBe(mainnetNetworkIdentifier);
});
});

0 comments on commit 29aa64f

Please sign in to comment.